PHP-dataURI | A PHP dataURI library , RFC 2397 Compliant
kandi X-RAY | PHP-dataURI Summary
kandi X-RAY | PHP-dataURI Summary
A PHP dataURI library, RFC 2397 Compliant
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Output a method block
- Output block content
- Block method blocks
- Returns the element
- Parses a data URI .
- Returns a string representation of a Data URI .
- Output header block
- Build a DataUri from a URL .
- Build a DataUri from a file .
- Output block content header
PHP-dataURI Key Features
PHP-dataURI Examples and Code Snippets
Community Discussions
Trending Discussions on PHP-dataURI
QUESTION
I'm using phpseclib to encrypt/decrypt data uri of some images. I've noticed that when I'm using the IV the data:image/png;base64
,data:image/jpg;base64
,data:image/jpeg;base64
part of the passed data uri will be lost, only the rest of the base64 string will remain and I will be unable to display the images after decryption operations. Is possible to use the IV without loosing the that part of each data uri encrypted?
ANSWER
Answered 2020-Nov-18 at 14:37This is the way I've used to solve this issue. I'm new to phplibsec so I was using $cipher->setIV(Random::string($cipher->getBlockLength() >> 3))
method in a wrong way to set and read the IV. The phpseclib documentations are not very useful and lack of examples on how to implement correctly encrypt and decrypt methods, in particular no example of how to manage the IV is provided. After some research here on SO and thanks to the help of community, I've figured out how to manage the IV.
Encryption of the data uri:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install PHP-dataURI
PHP requires the Visual C runtime (CRT). The Microsoft Visual C++ Redistributable for Visual Studio 2019 is suitable for all these PHP versions, see visualstudio.microsoft.com. You MUST download the x86 CRT for PHP x86 builds and the x64 CRT for PHP x64 builds. The CRT installer supports the /quiet and /norestart command-line switches, so you can also script it.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page