Class: PQCrypto::Seal::Opened

Inherits:
Struct
  • Object
show all
Defined in:
lib/pq_crypto/seal/core.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#content_suite_idObject

Returns the value of attribute content_suite_id

Returns:

  • (Object)

    the current value of content_suite_id



5
6
7
# File 'lib/pq_crypto/seal/core.rb', line 5

def content_suite_id
  @content_suite_id
end

#dataObject

Returns the value of attribute data

Returns:

  • (Object)

    the current value of data



5
6
7
# File 'lib/pq_crypto/seal/core.rb', line 5

def data
  @data
end

#metadataObject

Returns the value of attribute metadata

Returns:

  • (Object)

    the current value of metadata



5
6
7
# File 'lib/pq_crypto/seal/core.rb', line 5

def 
  @metadata
end

#padding_policy_idObject

Returns the value of attribute padding_policy_id

Returns:

  • (Object)

    the current value of padding_policy_id



5
6
7
# File 'lib/pq_crypto/seal/core.rb', line 5

def padding_policy_id
  @padding_policy_id
end

#payload_idObject

Returns the value of attribute payload_id

Returns:

  • (Object)

    the current value of payload_id



5
6
7
# File 'lib/pq_crypto/seal/core.rb', line 5

def payload_id
  @payload_id
end

#public_metadataObject

Returns the value of attribute public_metadata

Returns:

  • (Object)

    the current value of public_metadata



5
6
7
# File 'lib/pq_crypto/seal/core.rb', line 5

def 
  @public_metadata
end

#wrap_suite_idObject

Returns the value of attribute wrap_suite_id

Returns:

  • (Object)

    the current value of wrap_suite_id



5
6
7
# File 'lib/pq_crypto/seal/core.rb', line 5

def wrap_suite_id
  @wrap_suite_id
end

Class Method Details

.from_header(header, section, data:, metadata:) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/pq_crypto/seal/core.rb', line 7

def self.from_header(header, section, data:, metadata:)
  new(
    data: data, metadata: , public_metadata: header.,
    payload_id: header.payload_id, content_suite_id: header.content_suite_id,
    wrap_suite_id: section.wrap_suite_id, padding_policy_id: header.padding_policy_id
  )
end