Class: ZeroClick::Sellers::Encryption::Envelope

Inherits:
Object
  • Object
show all
Defined in:
lib/zeroclick/sellers/encryption.rb

Overview

A decrypted request, plus what is needed to encrypt the reply.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(plaintext:, protected_header:, cty: nil, reply_jwk: nil) ⇒ Envelope

Returns a new instance of Envelope.



61
62
63
64
65
66
67
# File 'lib/zeroclick/sellers/encryption.rb', line 61

def initialize(plaintext:, protected_header:, cty: nil, reply_jwk: nil)
  @plaintext = plaintext
  @protected_header = protected_header.freeze
  @cty = cty
  @reply_jwk = reply_jwk&.freeze
  freeze
end

Instance Attribute Details

#ctyObject (readonly)

Returns the value of attribute cty.



59
60
61
# File 'lib/zeroclick/sellers/encryption.rb', line 59

def cty
  @cty
end

#plaintextObject (readonly)

Returns the value of attribute plaintext.



59
60
61
# File 'lib/zeroclick/sellers/encryption.rb', line 59

def plaintext
  @plaintext
end

#protected_headerObject (readonly)

Returns the value of attribute protected_header.



59
60
61
# File 'lib/zeroclick/sellers/encryption.rb', line 59

def protected_header
  @protected_header
end

#reply_jwkObject (readonly)

Returns the value of attribute reply_jwk.



59
60
61
# File 'lib/zeroclick/sellers/encryption.rb', line 59

def reply_jwk
  @reply_jwk
end