Module: AEAD::Cipher::AES_GCM

Included in:
AES_128_GCM, AES_256_GCM
Defined in:
lib/aead/cipher/aes_gcm.rb

Overview

Provides the implementation details of AES + GCM, assuming the class including this module has defined proper class methods.

Instance Method Summary collapse

Instance Method Details

#initialize(key, options = {}) ⇒ Object

Instantiates the cipher with a secret key.

Parameters:

  • key (String)

    a secret encryption key



14
15
16
# File 'lib/aead/cipher/aes_gcm.rb', line 14

def initialize(key, options = {})
  super(self.class.cipher_mode, key, options)
end

#nonce_lenObject



18
19
20
# File 'lib/aead/cipher/aes_gcm.rb', line 18

def nonce_len
  iv_len
end