Class: AEAD::Cipher::AES_256_GCM

Inherits:
AEAD::Cipher show all
Defined in:
lib/aead/cipher/aes_256_gcm.rb

Overview

Encrypt plaintext using the Galois Counter Mode of AES.

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from AEAD::Cipher

#decrypt, #encrypt, generate_key, generate_nonce, #key_len, new, #nonce_len, signature_compare

Constructor Details

#initialize(key) ⇒ AES_256_GCM

Instantiates the cipher with a secret key.

Parameters:

  • key (String)

    a secret encryption key



17
18
19
# File 'lib/aead/cipher/aes_256_gcm.rb', line 17

def initialize(key)
  super('aes-256-gcm', key)
end

Class Method Details

.iv_lenObject



8
# File 'lib/aead/cipher/aes_256_gcm.rb', line 8

def self.iv_len;    12; end

.key_lenObject



7
# File 'lib/aead/cipher/aes_256_gcm.rb', line 7

def self.key_len;   32; end

.nonce_lenObject



9
# File 'lib/aead/cipher/aes_256_gcm.rb', line 9

def self.nonce_len; 12; end

.tag_lenObject



10
# File 'lib/aead/cipher/aes_256_gcm.rb', line 10

def self.tag_len;   16; end