CryptAlgorithm

com.github.cloudfiles.crypt.alg.CryptAlgorithm

A trait representing a concrete algorithm to encrypt and decrypt data.

The file systems supporting cryptography make use of this trait to actually encrypt and decrypt data. For this purpose, the trait provides functions to request a CryptCipher object for a cryptographic operation.

For some file system implementations, the size of files must be known before they can be uploaded. To provide this information when encrypting or decrypting the content of files dynamically during upload and download, a concrete algorithm implementation must be able to calculate the resulting size of data that is encrypted or decrypted.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

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

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

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

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