Class: COSE::SecurityMessage::Headers

Inherits:
Object
  • Object
show all
Defined in:
lib/cose/security_message/headers.rb

Constant Summary collapse

HEADER_LABEL_ALG =
1
HEADER_LABEL_KID =
4

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(protected_bucket, unprotected_bucket) ⇒ Headers

Returns a new instance of Headers.



11
12
13
14
# File 'lib/cose/security_message/headers.rb', line 11

def initialize(protected_bucket, unprotected_bucket)
  @protected_bucket = protected_bucket
  @unprotected_bucket = unprotected_bucket
end

Instance Attribute Details

#protected_bucketObject (readonly)

Returns the value of attribute protected_bucket.



9
10
11
# File 'lib/cose/security_message/headers.rb', line 9

def protected_bucket
  @protected_bucket
end

#unprotected_bucketObject (readonly)

Returns the value of attribute unprotected_bucket.



9
10
11
# File 'lib/cose/security_message/headers.rb', line 9

def unprotected_bucket
  @unprotected_bucket
end

Instance Method Details

#algObject



16
17
18
# File 'lib/cose/security_message/headers.rb', line 16

def alg
  header(HEADER_LABEL_ALG)
end

#kidObject



20
21
22
# File 'lib/cose/security_message/headers.rb', line 20

def kid
  header(HEADER_LABEL_KID)
end