hwsecurity / de.cotech.hw.secrets / ByteSecret /


open class ByteSecret

A more secure wrapper for ByteBuffer.

This class wraps a ByteBuffer, and attempts to ensure that its memory is overwritten when the object is freed, to keep secrets in memory as short a time as possible.


Name Summary
copy open fun copy(): ByteSecret
displayOnTextView open fun displayOnTextView(textView: TextView)
equals open fun equals(obj: Any): Boolean
finalize open fun finalize()
fromByteArrayAndClear open fun fromByteArrayAndClear(secret: Array<Byte>): ByteSecret
open fun fromByteArrayAndClear(secret: Array<Byte>, length: Int): ByteSecret
fromByteArrayTakeOwnership open fun fromByteArrayTakeOwnership(secret: Array<Byte>): ByteSecret
fromCharArrayAsUtf8TakeOwnership open fun fromCharArrayAsUtf8TakeOwnership(chars: Array<Char>): ByteSecret
fromEditableAsUtf8AndClear open fun fromEditableAsUtf8AndClear(editable: Editable): ByteSecret
getByteCopyAndClear open fun getByteCopyAndClear(): Array<Byte>
isEmpty open fun isEmpty(): Boolean
length open fun length(): Int
moveFromByteSecret open fun moveFromByteSecret(byteSecret: ByteSecret): ByteSecret
removeFromMemory open fun removeFromMemory()
unsafeFromString open fun unsafeFromString(secret: String): ByteSecret
unsafeGetByteCopy open fun unsafeGetByteCopy(): Array<Byte>