AliasPrivateKey

data class AliasPrivateKey(val alias: String) : PrivateKey

PrivateKey wrapper to just store the alias of a private key. Usually, HSM (hardware secure module) key entries are accessed via unique aliases and the private key material never leaves the box. This class wraps a String key alias into a PrivateKey object, which helps on transferring KeyPair objects without exposing the private key material. Then, whenever we need to sign with the actual private key, we provide the alias from this AliasPrivateKey to the underlying HSM implementation.

Constructors

Link copied to clipboard
constructor(alias: String)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open fun destroy()
Link copied to clipboard
open override fun getAlgorithm(): String
Link copied to clipboard
open override fun getEncoded(): ByteArray
Link copied to clipboard
open override fun getFormat(): String
Link copied to clipboard
open fun isDestroyed(): Boolean
Link copied to clipboard

Utility to simplify the act of signing a byte array.

Utility to simplify the act of signing a byte array and return a DigitalSignature.WithKey object. Note that there is no check if the public key matches with the signing private key.