EncryptedStrings | Generate encrypted strings for use in policy script
kandi X-RAY | EncryptedStrings Summary
kandi X-RAY | EncryptedStrings Summary
The Bash and Python scripts included here contain functions that use openssl to generate encrypted strings with unqiue hashes and passphrases required for decoding and the functions to use those values to decrypt the strings. The most obvious use case is passing credentials from a JSS policy to a script running on the client. This is usually done when some action using an API (either the JSS API or another API) is required. The password for this service account can be encrypted using these functions to better protect it. The encrypted string would be entered as a policy parameter. The unique salt and passphrase values would be present in the script downloaded to the client. This requires any party to have access to the script code as well as the policy in the JSS in order to decrypt the string.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Encrypts a string .
- Decrypts a string using the given password .
EncryptedStrings Key Features
EncryptedStrings Examples and Code Snippets
Community Discussions
Trending Discussions on EncryptedStrings
QUESTION
I'm using Crypto-js for encrypting password with a key and send it to server. I want to decrypt it in server using PHP. How this can be done?
JS:
...ANSWER
Answered 2020-Dec-10 at 13:22The following solution is not from my side but from @Artjom B., so all credits go to him. You will find the source here: https://stackoverflow.com/a/27678978/8166854.
To your problem: you run the CryptoJs encryption with a passphrase and not with a key. According to the docs (https://cryptojs.gitbook.io/docs/#the-cipher-algorithms) section cipher algorithms the (internal AES) key is derived from the passphrase with an outdated and unsecure function that should no longer be in use.
Artjom B. was able to make this key derivation available on PHP. As a side note: it is not necessary to present an initialization vector (IV) to the encryption function as the IV is as well derived from the passphrase, so I'm leaving it out in the following code.
This is the result on PHP-side:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install EncryptedStrings
You can use EncryptedStrings like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
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