mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2025-01-19 05:43:51 +01:00
Make the doublesha256digest generator more random (#371)
This commit is contained in:
parent
1ffeb73cd8
commit
7e9f4362bf
@ -174,8 +174,8 @@ sealed abstract class CryptoGenerators {
|
||||
/** Generates a random [[org.bitcoins.core.crypto.DoubleSha256Digest DoubleSha256Digest]] */
|
||||
def doubleSha256Digest: Gen[DoubleSha256Digest] =
|
||||
for {
|
||||
hex <- StringGenerators.hexString
|
||||
digest = CryptoUtil.doubleSHA256(hex)
|
||||
key <- privateKey
|
||||
digest = CryptoUtil.doubleSHA256(key.bytes)
|
||||
} yield digest
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user