- Inheritance
- < Object
MessageEncryptor is a simple way to encrypt values which get stored somewhere you don‘t trust.
The cipher text and initialization vector are base64 encoded and returned to you.
This can be used in situations similar to the MessageVerifier, but where you don‘t want users to be able to determine the value of the payload.
Classes & Modules
Constants
Name | Description | |
---|---|---|
OpenSSLCipherError | = OpenSSL::Cipher.const_defined?(:CipherError) ? OpenSSL::Cipher::CipherError : OpenSSL::CipherError |
Methods
Class
Visibility | Signature |
---|---|
public | new (secret, cipher = 'aes-256-cbc') |
Instance
Visibility | Signature |
---|---|
public | decrypt (encrypted_message) |
public | decrypt_and_verify (value) |
public | encrypt (value) |
public | encrypt_and_sign (value) |