com.github.rs3vans.krypto / AsymmetricEncryptCipher

AsymmetricEncryptCipher

class AsymmetricEncryptCipher : ConcreteCipher, EncryptCipher

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

Constructors

<init> AsymmetricEncryptCipher(key: PublicKey, provider: KryptoProvider = KryptoProvider.defaultInstance)

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

Properties

jdkCipher val jdkCipher: Cipher
key val key: PublicKey
provider val provider: KryptoProvider

Inherited Properties

algorithm val algorithm: String
blockSize val blockSize: Int

Functions

encrypt fun encrypt(decrypted: Decrypted): Encrypted

Inherited Functions

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