From 906c100c29beffc5c7ed2ce0b3da20b2935cc168 Mon Sep 17 00:00:00 2001 From: Andras Slemmer Date: Thu, 16 Jun 2016 17:06:59 +0100 Subject: [PATCH] contracts: use newSecureRandom() instead of SecureRandom.getInstanceStrong() --- contracts/src/main/kotlin/com/r3corda/contracts/cash/Cash.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contracts/src/main/kotlin/com/r3corda/contracts/cash/Cash.kt b/contracts/src/main/kotlin/com/r3corda/contracts/cash/Cash.kt index 522fbbc522..a60945715e 100644 --- a/contracts/src/main/kotlin/com/r3corda/contracts/cash/Cash.kt +++ b/contracts/src/main/kotlin/com/r3corda/contracts/cash/Cash.kt @@ -3,6 +3,7 @@ package com.r3corda.contracts.cash import com.r3corda.core.contracts.* import com.r3corda.core.crypto.Party import com.r3corda.core.crypto.SecureHash +import com.r3corda.core.crypto.newSecureRandom import com.r3corda.core.crypto.toStringShort import com.r3corda.core.utilities.Emoji import java.security.PublicKey @@ -74,7 +75,7 @@ class Cash : FungibleAsset() { * Allows new cash states to be issued into existence: the nonce ("number used once") ensures the transaction * has a unique ID even when there are no inputs. */ - data class Issue(override val nonce: Long = SecureRandom.getInstanceStrong().nextLong()) : FungibleAsset.Commands.Issue + data class Issue(override val nonce: Long = newSecureRandom().nextLong()) : FungibleAsset.Commands.Issue /** * A command stating that money has been withdrawn from the shared ledger and is now accounted for