Class: JWA::Algorithms::ContentEncryption::A128CbcHs256

Inherits:
Object
  • Object
show all
Includes:
AesCbcHs
Defined in:
lib/jwa/algorithms/content_encryption/a128_cbc_hs256.rb

Instance Attribute Summary

Attributes included from AesCbcHs

#iv, #key

Class Method Summary collapse

Methods included from AesCbcHs

#cipher, #cipher_round, #decrypt, #enc_key, #encrypt, #generate_tag, included, #initialize, #mac_key

Class Method Details

.cipher_nameObject



18
19
20
# File 'lib/jwa/algorithms/content_encryption/a128_cbc_hs256.rb', line 18

def cipher_name
  'AES-128-CBC'
end

.enc_nameObject



10
11
12
# File 'lib/jwa/algorithms/content_encryption/a128_cbc_hs256.rb', line 10

def enc_name
  'A128CBC-HS256'
end

.hashObject



22
23
24
# File 'lib/jwa/algorithms/content_encryption/a128_cbc_hs256.rb', line 22

def hash
  OpenSSL::Digest::SHA256.new
end

.key_lengthObject



14
15
16
# File 'lib/jwa/algorithms/content_encryption/a128_cbc_hs256.rb', line 14

def key_length
  32
end