Class: PQCrypto::Seal::Padding::Policy
- Inherits:
-
Object
- Object
- PQCrypto::Seal::Padding::Policy
- Defined in:
- lib/pq_crypto/seal/padding.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Instance Method Summary collapse
-
#initialize(id) ⇒ Policy
constructor
A new instance of Policy.
- #target(_base_length) ⇒ Object
- #verify!(context) ⇒ Object
Constructor Details
#initialize(id) ⇒ Policy
Returns a new instance of Policy.
22 23 24 25 |
# File 'lib/pq_crypto/seal/padding.rb', line 22 def initialize(id) @id = id freeze end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
20 21 22 |
# File 'lib/pq_crypto/seal/padding.rb', line 20 def id @id end |
Instance Method Details
#target(_base_length) ⇒ Object
27 28 29 |
# File 'lib/pq_crypto/seal/padding.rb', line 27 def target(_base_length) raise NotImplementedError end |
#verify!(context) ⇒ Object
31 32 33 34 35 |
# File 'lib/pq_crypto/seal/padding.rb', line 31 def verify!(context) verify_header!(context.header) verify_target!(context) true end |