Class: HPKE::ContextR
Instance Attribute Summary
Attributes inherited from Context
#base_nonce, #exporter_secret, #key, #sequence_number
Instance Method Summary collapse
Methods inherited from Context
#compute_nonce, #export, #increment_seq, #initialize
Methods included from Util
Constructor Details
This class inherits a constructor from HPKE::Context
Instance Method Details
#open(aad, ct) ⇒ Object
288 289 290 291 292 293 294 295 |
# File 'lib/hpke.rb', line 288 def open(aad, ct) raise Exception.new('AEAD is export only') if @hpke.aead_name == :export_only pt = @hpke.aead_decrypt(@key, compute_nonce(@sequence_number), aad, ct) # TODO: catch openerror then send out own openerror increment_seq pt end |