mirror of
https://github.com/corda/corda.git
synced 2025-06-19 07:38:22 +00:00
Do not remove entropyToKeyPair from DJVM (it is deterministic anyway and we might use it in tests) (#4036)
This commit is contained in:
committed by
GitHub
parent
fa4c54a080
commit
0621efe7c6
@ -138,7 +138,6 @@ class TransactionSignatureTest {
|
|||||||
val signableData = SignableData(txId, SignatureMetadata(3, Crypto.findSignatureScheme(keyPair.public).schemeNumberID))
|
val signableData = SignableData(txId, SignatureMetadata(3, Crypto.findSignatureScheme(keyPair.public).schemeNumberID))
|
||||||
return CheatingSecurityProvider().use {
|
return CheatingSecurityProvider().use {
|
||||||
CryptoSignUtils.doSign(keyPair, signableData)
|
CryptoSignUtils.doSign(keyPair, signableData)
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -809,7 +809,6 @@ object Crypto {
|
|||||||
* @return a new [KeyPair] from an entropy input.
|
* @return a new [KeyPair] from an entropy input.
|
||||||
* @throws IllegalArgumentException if the requested signature scheme is not supported for KeyPair generation using an entropy input.
|
* @throws IllegalArgumentException if the requested signature scheme is not supported for KeyPair generation using an entropy input.
|
||||||
*/
|
*/
|
||||||
@DeleteForDJVM
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
fun deriveKeyPairFromEntropy(signatureScheme: SignatureScheme, entropy: BigInteger): KeyPair {
|
fun deriveKeyPairFromEntropy(signatureScheme: SignatureScheme, entropy: BigInteger): KeyPair {
|
||||||
return when (signatureScheme) {
|
return when (signatureScheme) {
|
||||||
@ -825,7 +824,6 @@ object Crypto {
|
|||||||
* @param entropy a [BigInteger] value.
|
* @param entropy a [BigInteger] value.
|
||||||
* @return a new [KeyPair] from an entropy input.
|
* @return a new [KeyPair] from an entropy input.
|
||||||
*/
|
*/
|
||||||
@DeleteForDJVM
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
fun deriveKeyPairFromEntropy(entropy: BigInteger): KeyPair = deriveKeyPairFromEntropy(DEFAULT_SIGNATURE_SCHEME, entropy)
|
fun deriveKeyPairFromEntropy(entropy: BigInteger): KeyPair = deriveKeyPairFromEntropy(DEFAULT_SIGNATURE_SCHEME, entropy)
|
||||||
|
|
||||||
|
@ -150,7 +150,6 @@ fun generateKeyPair(): KeyPair = Crypto.generateKeyPair()
|
|||||||
* @param entropy a [BigInteger] value.
|
* @param entropy a [BigInteger] value.
|
||||||
* @return a deterministically generated [KeyPair] for the [Crypto.DEFAULT_SIGNATURE_SCHEME].
|
* @return a deterministically generated [KeyPair] for the [Crypto.DEFAULT_SIGNATURE_SCHEME].
|
||||||
*/
|
*/
|
||||||
@DeleteForDJVM
|
|
||||||
fun entropyToKeyPair(entropy: BigInteger): KeyPair = Crypto.deriveKeyPairFromEntropy(entropy)
|
fun entropyToKeyPair(entropy: BigInteger): KeyPair = Crypto.deriveKeyPairFromEntropy(entropy)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user