class Message::Encryptor
- Message::Encryptor
- Reference
- Object
Defined in:
message/encryptor.crConstructors
Instance Method Summary
- #decrypt(value : Bytes) : Bytes
- #encrypt(value) : Bytes
-
#encrypt_and_sign(value : Slice(UInt8)) : String
Encrypt and sign a message.
- #encrypt_and_sign(value : String) : String
- #verifier : Verifier
-
#verify_and_decrypt(value : String) : Bytes
Verify and Decrypt a message.
Constructor Detail
Instance Method Detail
def encrypt_and_sign(value : Slice(UInt8)) : String
#
Encrypt and sign a message. We need to sign the message in order to avoid padding attacks. Reference: http://www.limited-entropy.com/padding-oracle-attacks.
def verify_and_decrypt(value : String) : Bytes
#
Verify and Decrypt a message. We need to verify the message in order to avoid padding attacks. Reference: http://www.limited-entropy.com/padding-oracle-attacks.