I want to store a PHP-generated key as a salt in a text file at the root of my application.
This key would help encrypt passwords, database access information. That is, such information would be encrypted for use by PHP.
If you need to access the database through javascript, you would use this salt to decrypt information and access it by reading directly from the text file.
My question
Is it possible that some encrypted value in PHP can be decrypted in javascript and vice versa? How can it be done, and which algorithm to use?
Is there any standard to traffic information between the two languages (PHP and javascript)?