mirror of
https://github.com/corda/corda.git
synced 2025-06-11 11:51:44 +00:00
contracts: use newSecureRandom() instead of SecureRandom.getInstanceStrong()
This commit is contained in:
parent
6229e39b42
commit
906c100c29
@ -3,6 +3,7 @@ package com.r3corda.contracts.cash
|
|||||||
import com.r3corda.core.contracts.*
|
import com.r3corda.core.contracts.*
|
||||||
import com.r3corda.core.crypto.Party
|
import com.r3corda.core.crypto.Party
|
||||||
import com.r3corda.core.crypto.SecureHash
|
import com.r3corda.core.crypto.SecureHash
|
||||||
|
import com.r3corda.core.crypto.newSecureRandom
|
||||||
import com.r3corda.core.crypto.toStringShort
|
import com.r3corda.core.crypto.toStringShort
|
||||||
import com.r3corda.core.utilities.Emoji
|
import com.r3corda.core.utilities.Emoji
|
||||||
import java.security.PublicKey
|
import java.security.PublicKey
|
||||||
@ -74,7 +75,7 @@ class Cash : FungibleAsset<Currency>() {
|
|||||||
* Allows new cash states to be issued into existence: the nonce ("number used once") ensures the transaction
|
* 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.
|
* 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
|
* A command stating that money has been withdrawn from the shared ledger and is now accounted for
|
||||||
|
Loading…
x
Reference in New Issue
Block a user