Class: Miscreant::STREAM::Decryptor
- Inherits:
-
Object
- Object
- Miscreant::STREAM::Decryptor
- Defined in:
- lib/miscreant/stream.rb
Overview
A STREAM decryptor
This corresponds to the ???? stream decryptor object as defined in the paper Online Authenticated-Encryption and its Nonce-Reuse Misuse-Resistance
Instance Method Summary collapse
-
#initialize(alg, key, nonce) ⇒ Decryptor
constructor
Create a new STREAM decryptor.
-
#inspect ⇒ String
Inspect this STREAM encryptor instance.
-
#open(ciphertext, ad: "", last_block: false) ⇒ String
Decrypt the next message in the stream.
Constructor Details
Instance Method Details
#inspect ⇒ String
Inspect this STREAM encryptor instance
93 94 95 |
# File 'lib/miscreant/stream.rb', line 93 def inspect to_s end |
#open(ciphertext, ad: "", last_block: false) ⇒ String
Decrypt the next message in the stream
86 87 88 |
# File 'lib/miscreant/stream.rb', line 86 def open(ciphertext, ad: "", last_block: false) @aead.open(ciphertext, nonce: @nonce_encoder.next(last_block), ad: ad) end |