com.github.rs3vans.krypto / ConcreteCipher

ConcreteCipher

abstract class ConcreteCipher : Any

A simple base class that defines a cipher which wraps an instance Cipher along with a Key.

Constructors

<init> ConcreteCipher()

A simple base class that defines a cipher which wraps an instance Cipher along with a Key.

Properties

algorithm val algorithm: String
blockSize val blockSize: Int
jdkCipher abstract val jdkCipher: Cipher
key abstract val key: Key
provider abstract val provider: KryptoProvider

Functions

withCipher fun <X> withCipher(action: (Cipher) -> X): X

Inheritors

AsymmetricDecryptCipher class AsymmetricDecryptCipher : ConcreteCipher, DecryptCipher

An decrypting-only cipher which uses an RSA-based PrivateKey for decryption.

AsymmetricEncryptCipher class AsymmetricEncryptCipher : ConcreteCipher, EncryptCipher

An encrypting-only cipher which uses an RSA-based PublicKey for encryption.

AuthenticatingBlockCipher class AuthenticatingBlockCipher : ConcreteCipher, EncryptCipher, DecryptCipher

An encrypting/decrypting cipher which uses the Galois-counter mode (GCM).

BlockCipher class BlockCipher : ConcreteCipher, EncryptCipher, DecryptCipher

An encrypting/decrypting cipher which uses the chained-block mode (CBC).