Module cryptography-core¶
Provides multiplatform API to build, get and use cryptography primitives
Core entities:
- CryptographyProvider provides a way to get specific CryptographyAlgorithm by its id
- CryptographyProvider.Default is the default provider which is just a link to the first registered provider. After adding dependency to provider (like openssl3) it will be automatically registered as default
- inheritors of CryptographyAlgorithm (like f.e. AES) provides access to operations (like f.e. cipher)
Example¶
CryptographyProvider.Default
.get(SHA512)
.hasher()
.hash("Kotlin is Awesome".encodeToByteArray())
Using in your projects¶
dependencies {
implementation("dev.whyoleg.cryptography:cryptography-core:0.3.0")
}
Package dev.whyoleg.cryptography¶
Provides core primitives for creating and accessing CryptographyAlgorithm and CryptographyProvider
Package dev.whyoleg.cryptography.algorithms.digest¶
Provides common digest algorithms, like SHA256 and SHA512
Package dev.whyoleg.cryptography.algorithms.symmetric¶
Provides common symmetric ciphers and MAC algorithms, like AES and HMAC
Package dev.whyoleg.cryptography.algorithms.asymmetric¶
Provides common asymmetric encryption and signature algorithms, like RSA and ECDSA
Package dev.whyoleg.cryptography.operations.cipher¶
Provides API for encryption/decryption and Authenticated encryption/decryption
Package dev.whyoleg.cryptography.operations.hash¶
Provides hashing operation
Package dev.whyoleg.cryptography.operations.signature¶
Provides signature verification and generation API
Package dev.whyoleg.cryptography.materials.key¶
Provides API for working with keys: encoding, decoding and generation