Aes

com.github.cloudfiles.crypt.alg.aes.Aes
object Aes extends CryptAlgorithm

A module implementing the AES crypto algorithm.

This module implements functionality to encrypt and decrypt data using the AES algorithm with Counter (CTR) mode cipher. For each encryption, a random initialization vector is used. This has the effect that encryption of the same plain text multiple times causes different results.

Attributes

Graph
Supertypes
trait CryptAlgorithm
class Object
trait Matchable
class Any
Self type
Aes.type

Members list

Value members

Concrete methods

override def decryptCipher(key: Key): CryptCipher

Returns a new ''CryptCipher'' object that can be used to decrypt data. The resulting object is applicable for a single decrypt operation that can involve an arbitrary number of data chunks.

Returns a new ''CryptCipher'' object that can be used to decrypt data. The resulting object is applicable for a single decrypt operation that can involve an arbitrary number of data chunks.

Value parameters

key

the key to decrypt data

Attributes

Returns

the ''CryptCipher'' to decrypt data

Definition Classes
CryptAlgorithm
override def decryptedSize(orgSize: Long): Long

Calculates the size of data that is going to be decrypted using this algorithm based on its original (encrypted) size.

Calculates the size of data that is going to be decrypted using this algorithm based on its original (encrypted) size.

Value parameters

orgSize

the original size of the data

Attributes

Returns

the size of this data after decryption

Definition Classes
CryptAlgorithm
override def encryptCipher(key: Key): CryptCipher

Returns a new ''CryptCipher'' object that can be used to encrypt data. The resulting object is applicable for a single encrypt operation that can involve an arbitrary number of data chunks.

Returns a new ''CryptCipher'' object that can be used to encrypt data. The resulting object is applicable for a single encrypt operation that can involve an arbitrary number of data chunks.

Value parameters

key

the key to be used for encryption

Attributes

Returns

the ''CryptCipher'' to encrypt data

Definition Classes
CryptAlgorithm
override def encryptedSize(orgSize: Long): Long

Calculates the size of data that is going to be encrypted using this algorithm based on its original size.

Calculates the size of data that is going to be encrypted using this algorithm based on its original size.

Value parameters

orgSize

the original size of the data

Attributes

Returns

the size of this data after encryption

Definition Classes
CryptAlgorithm
def keyFromArray(keyData: Array[Byte]): Key

Generates a key from the given byte array. This method expects that the passed in array has at least the length required by a valid key (additional bytes are ignored).

Generates a key from the given byte array. This method expects that the passed in array has at least the length required by a valid key (additional bytes are ignored).

Value parameters

keyData

the array with the data of the key

Attributes

Returns

the resulting key

def keyFromString(strKey: String): Key

Generates a key from the given string. If necessary, the string is padded or truncated to come to the correct key length in bytes.

Generates a key from the given string. If necessary, the string is padded or truncated to come to the correct key length in bytes.

Value parameters

strKey

the string-based key

Attributes

Returns

the resulting key

Concrete fields

val AlgorithmName: String

The name of the encryption algorithm.

The name of the encryption algorithm.

Attributes

val CipherName: String

The name of the cipher used for encrypt / decrypt operations.

The name of the cipher used for encrypt / decrypt operations.

Attributes

val IvLength: Int

The length of the initialization vector.

The length of the initialization vector.

Attributes

val KeyLength: Int

The length of keys required by the encryption algorithm.

The length of keys required by the encryption algorithm.

Attributes