|
1 | 1 | //[krypt-core](../../index.md)/[com.chrynan.krypt.core](index.md)
|
2 | 2 |
|
3 |
| -# Package com.chrynan.krypt.core |
| 3 | +# Package-level declarations |
4 | 4 |
|
5 | 5 | ## Types
|
6 | 6 |
|
|
24 | 24 | |---|---|
|
25 | 25 | | [generate](generate.md) | [common]<br>suspend fun <[K](generate.md) : [Key](-key/index.md)> [KeyGenerator](-key-generator/index.md)<[K](generate.md)>.[generate](generate.md)(): [K](generate.md)<br>A convenience function that calls the [KeyGenerator.invoke](-key-generator/invoke.md) function. Which function is used is up to preference.<br>[common]<br>suspend fun <[PublicKey](generate.md), [PrivateKey](generate.md)> [KeyPairGenerator](-key-pair-generator/index.md)<[PublicKey](generate.md), [PrivateKey](generate.md)>.[generate](generate.md)(): [KeyPair](-key-pair/index.md)<[PublicKey](generate.md), [PrivateKey](generate.md)><br>A convenience function that calls the [invoke](invoke.md) function. Which function is used is up to preference. |
|
26 | 26 | | [hash](hash.md) | [common]<br>suspend fun <[Input](hash.md), [Output](hash.md)> [HashFunction](-hash-function/index.md)<[Input](hash.md), [Output](hash.md)>.[hash](hash.md)(source: [Input](hash.md)): [Output](hash.md)<br>A convenience function that delegates to the [invoke](invoke.md) function of the [HashFunction](-hash-function/index.md) interface. This is provided for preference, as it may be preferable to use "hash" instead of "invoke" at the call-site. |
|
| 27 | +| [HashFunction](-hash-function.md) | [common]<br>fun <[Input](-hash-function.md), [Output](-hash-function.md)> [HashFunction](-hash-function.md)(algorithmName: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)? = null, hash: suspend (source: [Input](-hash-function.md)) -> [Output](-hash-function.md)): [HashFunction](-hash-function/index.md)<[Input](-hash-function.md), [Output](-hash-function.md)><br>Creates a [HashFunction](-hash-function/index.md) implementation using the provided [algorithmName](-hash-function.md) and [hash](-hash-function.md) function block. | |
27 | 28 | | [invoke](invoke.md) | [common]<br>operator fun [SecureString.Companion](-secure-string/-companion/index.md).[invoke](invoke.md)(charSequence: [CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html)): [SecureString](-secure-string/index.md)<br>[common]<br>suspend operator fun [HMAC.Companion](-h-m-a-c/-companion/index.md).[invoke](invoke.md)(key: [Key](-key/index.md), message: [ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html), hash: [HashFunction](-hash-function/index.md)<[ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html), [ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html)>, blockSize: [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)): [ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html)<br>A convenience function for invoking the [invoke](invoke.md) function with the provided [key](-key/index.md) value.<br>[common]<br>suspend operator fun [HMAC.Companion](-h-m-a-c/-companion/index.md).[invoke](invoke.md)(key: [ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html), message: [ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html), hash: [HashFunction](-hash-function/index.md)<[ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html), [ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html)>, blockSize: [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)): [ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html)<br>A function that can generate a HMAC (Hash-based message authentication code). A message authentication code (MAC) is a value used to verify the data integrity and authenticity of a message (or data). A HMAC is a way of computing a MAC for data using a cryptographic hash function. The returned value is a MAC that can be included with a message to verify its authenticity and to ensure that the message data has not been tampered with. |
|
28 | 29 | | [isNodeJs](is-node-js.md) | [js]<br>fun [isNodeJs](is-node-js.md)(): [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) |
|
29 | 30 | | [plus](plus.md) | [common]<br>operator fun [SecureString](-secure-string/index.md).[plus](plus.md)(other: [CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html)): [SecureString](-secure-string/index.md) |
|
30 | 31 | | [toByteArray](to-byte-array.md) | [common]<br>fun [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html).[toByteArray](to-byte-array.md)(order: [Endian](-endian/index.md) = Endian.Big): [ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html)<br>Converts this [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) value into a [ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html) representation in the provided [order](to-byte-array.md).<br>[common]<br>fun [IntArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int-array/index.html).[toByteArray](to-byte-array.md)(order: [Endian](-endian/index.md) = Endian.Big): [ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html)<br>Converts this [IntArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int-array/index.html) into a [ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html) by converting each [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) in this array into a [ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html) with the provided [order](to-byte-array.md) and appending the results.<br>[common]<br>fun [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html).[toByteArray](to-byte-array.md)(order: [Endian](-endian/index.md) = Endian.Big): [ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html)<br>Converts this [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html) value into a [ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html) representation in the provided [order](to-byte-array.md).<br>[common]<br>fun [LongArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long-array/index.html).[toByteArray](to-byte-array.md)(order: [Endian](-endian/index.md) = Endian.Big): [ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html)<br>Converts this [LongArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long-array/index.html) into a [ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html) by converting each [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html) in this array into a [ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html) with the provided [order](to-byte-array.md) and appending the results. |
|
31 | 32 | | [toInt](to-int.md) | [common]<br>fun [ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html).[toInt](to-int.md)(startInclusive: [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) = 0, endExclusive: [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) = size, order: [Endian](-endian/index.md) = Endian.Big): [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)<br>Converts the specified indices of this [ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html) into an [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) value in the provider [order](to-int.md). |
|
32 | 33 | | [toLong](to-long.md) | [common]<br>fun [ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html).[toLong](to-long.md)(startInclusive: [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) = 0, endExclusive: [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) = size, order: [Endian](-endian/index.md) = Endian.Big): [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)<br>Converts the specified indices of this [ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html) into a [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html) value in the provider [order](to-long.md). |
|
33 | 34 | | [toMultiplatformKey](../../../krypt-core/krypt-core/com.chrynan.krypt.core/[jvm]to-multiplatform-key.md) | [android, jvm]<br>[android]<br>fun [Key](https://developer.android.com/reference/kotlin/java/security/Key.html).[toMultiplatformKey]([android]to-multiplatform-key.md)(): [Key](../../../krypt-core/krypt-core/com.chrynan.krypt.core/-key/index.md)<br>[jvm]<br>fun [Key](https://developer.android.com/reference/kotlin/java/security/Key.html).[toMultiplatformKey]([jvm]to-multiplatform-key.md)(): [Key](../../../krypt-core/krypt-core/com.chrynan.krypt.core/-key/index.md)<br>Converts this [java.security.Key](https://developer.android.com/reference/kotlin/java/security/Key.html) to a [Key](../../../krypt-core/krypt-core/com.chrynan.krypt.core/-key/index.md) instance from this krypt library. |
|
| 35 | +| [toMultiplatformKeyPair](../../../krypt-core/krypt-core/com.chrynan.krypt.core/[jvm]to-multiplatform-key-pair.md) | [android, jvm]<br>[android]<br>fun [KeyPair](https://developer.android.com/reference/kotlin/java/security/KeyPair.html).[toMultiplatformKeyPair]([android]to-multiplatform-key-pair.md)(): [KeyPair](../../../krypt-core/krypt-core/com.chrynan.krypt.core/-key-pair/index.md)<[Key](../../../krypt-core/krypt-core/com.chrynan.krypt.core/-key/index.md), [Key](../../../krypt-core/krypt-core/com.chrynan.krypt.core/-key/index.md)><br>[jvm]<br>fun [KeyPair](https://developer.android.com/reference/kotlin/java/security/KeyPair.html).[toMultiplatformKeyPair]([jvm]to-multiplatform-key-pair.md)(): [KeyPair](../../../krypt-core/krypt-core/com.chrynan.krypt.core/-key-pair/index.md)<[Key](../../../krypt-core/krypt-core/com.chrynan.krypt.core/-key/index.md), [Key](../../../krypt-core/krypt-core/com.chrynan.krypt.core/-key/index.md)><br>Converts this [java.security.KeyPair](https://developer.android.com/reference/kotlin/java/security/KeyPair.html) to a [KeyPair](../../../krypt-core/krypt-core/com.chrynan.krypt.core/-key-pair/index.md) instance from this krypt library. | |
34 | 36 | | [toSecureString](to-secure-string.md) | [common]<br>fun [CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html).[toSecureString](to-secure-string.md)(): [SecureString](-secure-string/index.md)<br>fun [CharArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-array/index.html).[toSecureString](to-secure-string.md)(eraseSource: [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) = true): [SecureString](-secure-string/index.md) |
|
0 commit comments