Coder Social home page Coder Social logo

devjack / encrypted-content-encoding Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 0.0 47 KB

An implementation of RFC8188 for PHP - Encrypted Content-Encoding

License: MIT License

PHP 96.86% Dockerfile 3.14%
encoding encryption http middleware php rfc8188

encrypted-content-encoding's People

Contributors

devjack avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

encrypted-content-encoding's Issues

Fails to strip 0x01 and 0x02 padding on decoding

The current implementation fails to properly handle 0x00 padding in the following scenarios:

  • 0x01 is a padding delimiter for records (except when...)
  • 0x02 is a padding delimiter for the last record.

Quote, Section 2 of RFC8188 (Page 4)

Each record contains a single padding delimiter octet followed by any
number of zero octets. The last record uses a padding delimiter
octet set to the value 2, all other records have a padding delimiter
octet value of 1.

On decryption, the padding delimiter is the last non-zero-valued
octet of the record. A decrypter MUST fail if the record contains no
non-zero octet. A decrypter MUST fail if the last record contains a
padding delimiter with a value other than 2 or if any record other
than the last contains a padding delimiter with a value other than 1.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.