crl
v0.0.2
Published
Context-based encryption scheme
Downloads
8
Readme
cereal
Context-based encryption scheme
How it works?
Cereal uses the previously decrypted text as key at the next encryption. This means always changing keys, that never leave your instance. It uses AES256 as encryption algorithm, but the keys don't need to be shared between the two instances, because they always evolve based on the decrypted message.
API
new Cereal(rootKey)
The constructor. It accepts a rootKey, which will be the first key of the encryptions.
cereal.encrypt(msg)
Returns the encrypted string.
cereal.decrypt(msg)
Return the decrypted string.
cereal.set_key(key)
Set the key manually.