class Ronin::Support::Crypto::Cipher::AES

The AES cipher.

Attributes

key_size[R]

The AES cipher key size.

@return [Integer]

The key size in bits.
mode[R]

The AES cipher mode.

@return [:cbc, :cfb, :ofb, :ctr, Symbol]

Public Class Methods

new(key_size: , mode: :cbc, **kwargs) click to toggle source

Initializes the AES cipher.

@param [Integer] key_size

The desired key size in bits.

@param [:cbc, :cfb, :ofb, :ctr, Symbol] mode

The desired AES cipher mode.

@param [Hash{Symbol => Object}] kwargs

Additional keyword arguments for {Cipher#initialize}.
Calls superclass method Ronin::Support::Crypto::Cipher::new
# File lib/ronin/support/crypto/cipher/aes.rb, line 53
def initialize(key_size: , mode: :cbc, **kwargs)
  super("aes-#{key_size}-#{mode}", **kwargs)

  @key_size = key_size
  @mode     = mode
end
supported() click to toggle source

The list of supported AES ciphers.

@return [Array<String>]

The list of supported AES cipher names.
# File lib/ronin/support/crypto/cipher/aes.rb, line 66
def self.supported
  super().grep(/^aes/)
end