Package-level declarations

Types

Link copied to clipboard
class AES256Key(val data: ByteArray) : ByteDataContainer
Link copied to clipboard
internal class AESDecrypt(secretKey: AES256Key)
internal class AESDecrypt(secretKey: AES256Key)
Link copied to clipboard
internal class AESEncrypt
internal class AESEncrypt
Link copied to clipboard
abstract class ByteDataContainer(val data: ByteArray)

Simple utility class that enables holding ByteArrays. This implements equals and hash code.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
class EncryptedData(val data: ByteArray) : ByteDataContainer
Link copied to clipboard
Link copied to clipboard
class PlainData(val data: ByteArray) : ByteDataContainer
Link copied to clipboard
class SHA256Key(val data: ByteArray) : ByteDataContainer

Functions

Link copied to clipboard
fun calcFileMd5(dataSource: <Error class: unknown class>): String?

Method used to calculate the digested MD5 hash of a relatively small byte array

Link copied to clipboard
fun calcFileSHA256(dataSource: <Error class: unknown class>): ByteArray?

Method used to calculate the digested SHA256 hash of a relatively small byte array

Link copied to clipboard
fun calcMd5(bytes: ByteArray): String
Link copied to clipboard
fun calcSHA256(bytes: ByteArray): ByteArray
Link copied to clipboard

Method used to decrypt a relatively small array of bytes using the AES256 decryption algorithm

Link copied to clipboard
expect fun decryptFileWithAES256(source: <Error class: unknown class>, sink: <Error class: unknown class>, secretKey: AES256Key): Long

Method used to decrypt some binary data using the AES256 encryption algorithm

actual fun decryptFileWithAES256(source: <Error class: unknown class>, sink: <Error class: unknown class>, secretKey: AES256Key): Long
actual fun decryptFileWithAES256(source: <Error class: unknown class>, sink: <Error class: unknown class>, secretKey: AES256Key): Long
Link copied to clipboard
expect fun encryptDataWithAES256(data: PlainData, key: AES256Key = generateRandomAES256Key()): EncryptedData

Method used to encrypt a relatively small array of bytes using the AES256 encryption algorithm

Link copied to clipboard
expect fun encryptFileWithAES256(source: <Error class: unknown class>, key: AES256Key, sink: <Error class: unknown class>): Long

Method used to encrypt binary data using the AES256 encryption algorithm

actual fun encryptFileWithAES256(source: <Error class: unknown class>, key: AES256Key, sink: <Error class: unknown class>): Long
actual fun encryptFileWithAES256(source: <Error class: unknown class>, key: AES256Key, sink: <Error class: unknown class>): Long
Link copied to clipboard

Method to generate a random Secret Key via the AES256 ciphering Algorithm