com.github.rs3vans.krypto / KryptoProvider

KryptoProvider

class KryptoProvider : Any

A class that encapsulates a JCE provider.

See Also

defaultInstance

Functions

cipher fun cipher(algorithm: String): Cipher

Provides an instance of Cipher.

keyFactory fun keyFactory(algorithm: String): KeyFactory

Provides an instance of KeyFactory.

keyGenerator fun keyGenerator(algorithm: String): KeyGenerator

Provides an instance of KeyGenerator.

keyPairGenerator fun keyPairGenerator(algorithm: String): KeyPairGenerator

Provides an instance of KeyPairGenerator.

mac fun mac(algorithm: String): Mac

Provides an instance of Mac.

messageDigest fun messageDigest(algorithm: String): MessageDigest

Provides an instance of MessageDigest.

secretKeyFactory fun secretKeyFactory(algorithm: String): SecretKeyFactory

Provides an instance of SecretKeyFactory.

Companion Object Properties

defaultInstance val defaultInstance: KryptoProvider

An instance of KryptoProvider which uses the default JCE provider.

Companion Object Functions

instanceForProvider fun instanceForProvider(providerName: String): KryptoProvider

Retrieves an instance of KryptoProvider for the given provider name.

fun instanceForProvider(provider: Provider): KryptoProvider

Retrieves an instance of KryptoProvider for the given Provider.