123456789_123456789_123456789_123456789_123456789_

Class: OpenSSL::Cipher::Cipher

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Instance Chain:
Inherits: OpenSSL::Cipher
Defined in: ext/openssl/lib/openssl/cipher.rb

Overview

Deprecated.

This class is only provided for backwards compatibility. Use ::OpenSSL::Cipher.

Class Method Summary

::OpenSSL::Cipher - Inherited

.new

The string must contain a valid cipher name like “aes-256-cbc”.

.ciphers

Returns the names of all available ciphers in an array.

Instance Attribute Summary

::OpenSSL::Cipher - Inherited

#auth_data=

Sets the cipher’s additional authenticated data.

#auth_tag

Gets the authentication tag generated by Authenticated Encryption Cipher modes (GCM for example).

#auth_tag=

Sets the authentication tag to verify the integrity of the ciphertext.

#auth_tag_len=

Sets the length of the authentication tag to be generated or to be given for AEAD ciphers that requires it as in input parameter.

#authenticated?

Indicated whether this Cipher instance uses an Authenticated Encryption mode.

#ccm_data_len=

Sets the length of the plaintext / ciphertext message that will be processed in CCM mode.

#iv=

Sets the cipher IV.

#iv_len

Returns the expected length in bytes for an IV for this Cipher.

#iv_len=

Sets the IV/nonce length of the Cipher.

#key=

Sets the cipher key.

#key_len

Returns the key length in bytes of the Cipher.

#key_len=

Sets the key length of the cipher.

#padding=

Enables or disables padding.

Instance Method Summary

::OpenSSL::Cipher - Inherited

#block_size

Returns the size in bytes of the blocks on which this Cipher operates on.

#decrypt

Initializes the Cipher for decryption.

#encrypt

Initializes the Cipher for encryption.

#final

Returns the remaining data held in the cipher object.

#initialize_copy,
#name

Returns the name of the cipher which may differ slightly from the original name provided.

#pkcs5_keyivgen

Generates and sets the key/IV based on a password.

#random_iv

Generate a random IV with Random.random_bytes and sets it to the cipher, and returns it.

#random_key

Generate a random key with Random.random_bytes and sets it to the cipher, and returns it.

#reset

Fully resets the internal state of the Cipher.

#update

Encrypts data in a streaming fashion.

#ciphers

Returns the names of all available ciphers in an array.

Constructor Details

This class inherits a constructor from OpenSSL::Cipher