logger 2

logger() Instance Public methods

start

start(name, id, payload) Instance Public methods

color

color(text, color, bold=false) Instance Protected methods Set color by using a string or one of the defined constants. If a third option is set to true, it also adds bold to the string. This is based on the Highline implementation and will automatically append CLEAR to the end of the returned String.

new

new(secret, *signature_key_or_options) Class Public methods Initialize a new MessageEncryptor. secret must be at least as long as the cipher key size. For the default 'aes-256-cbc' cipher, this is 256 bits. If you are using a user-entered secret, you can generate a suitable key with OpenSSL::Digest::SHA256.new(user_secret).digest or similar. Options: :cipher - Cipher to use. Can be any cipher returned by OpenSSL::Cipher.ciphers. Default is 'aes-256-cbc'. :serializer - Object

decrypt_and_verify

decrypt_and_verify(value) Instance Public methods Decrypt and verify a message. We need to verify the message in order to avoid padding attacks. Reference: www.limited-entropy.com/padding-oracle-attacks.

encrypt_and_sign

encrypt_and_sign(value) Instance Public methods Encrypt and sign a message. We need to sign the message in order to avoid padding attacks. Reference: www.limited-entropy.com/padding-oracle-attacks.

new

new(secret, options = {}) Class Public methods

generate

generate(value) Instance Public methods

verify

verify(signed_message) Instance Public methods

consumes?

consumes?(string) Class Public methods Returns true when the proxy class can handle the string. Returns false otherwise.