Class: Sandal::Enc::A128CBC_HS256

Inherits:
ACBC_HS
  • Object
show all
Defined in:
lib/sandal/enc/acbc_hs.rb

Overview

The A128CBC-HS256 encryption method.

Constant Summary collapse

NAME =

The JWA name of the algorithm.

"A128CBC-HS256"
KEY_SIZE =

 The size of key that is required, in bits.

256

Instance Attribute Summary

Attributes inherited from ACBC_HS

#alg, #name

Instance Method Summary collapse

Methods inherited from ACBC_HS

#decrypt, #encrypt

Constructor Details

#initialize(alg) ⇒ A128CBC_HS256

Initialises a new instance.

Parameters:

  • alg (#name, #encrypt_key, #decrypt_key)

    The algorithm to use to encrypt and/or decrypt the AES key.



123
124
125
# File 'lib/sandal/enc/acbc_hs.rb', line 123

def initialize(alg)
  super(NAME, KEY_SIZE / 2, KEY_SIZE, alg)
end