corda / net.corda.core.crypto / Crypto / deriveKeyPairFromEntropy

deriveKeyPairFromEntropy

@JvmStatic fun deriveKeyPairFromEntropy(signatureScheme: SignatureScheme, entropy: BigInteger): KeyPair

Returns a key pair derived from the given BigInteger entropy. This is useful for unit tests and other cases where you want hard-coded private keys. Currently, the following schemes are supported: EDDSA_ED25519_SHA512, ECDSA_SECP256R1_SHA256 and ECDSA_SECP256K1_SHA256.

Parameters

signatureScheme - a supported SignatureScheme, see Crypto.

entropy - a BigInteger value.

Exceptions

IllegalArgumentException - if the requested signature scheme is not supported for KeyPair generation using an entropy input.

Return
a new KeyPair from an entropy input.

@JvmStatic fun deriveKeyPairFromEntropy(entropy: BigInteger): KeyPair

Returns a DEFAULT_SIGNATURE_SCHEME key pair derived from the given BigInteger entropy.

Parameters

entropy - a BigInteger value.

Return
a new KeyPair from an entropy input.