| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Test.Cardano.Protocol.Crypto.VRF.Fake
Description
Fake implementation of VRF, where the random value isn't random but given by the creator.
Synopsis
- newtype NatNonce = NatNonce Natural
- data FakeVRF
- data family VerKeyVRF v
- data family SignKeyVRF v
- data WithResult a = WithResult !a !Word64
Documentation
We provide our own nonces to mkBlock, which we then wish to recover as
the output of the VRF functions. In general, however, we just derive them
from a natural. Since the nonce is a hash, we do not want to recover it to
find a preimage. In testing, therefore, we just wrap the raw natural, which
we then encode into the fake VRF implementation.
Instances
data family VerKeyVRF v Source #
Instances
data family SignKeyVRF v Source #
Instances
data WithResult a Source #
Constructors
| WithResult !a !Word64 |
Instances
| Show a ⇒ Show (WithResult a) Source # | |
Defined in Test.Cardano.Protocol.Crypto.VRF.Fake Methods showsPrec ∷ Int → WithResult a → ShowS # show ∷ WithResult a → String # showList ∷ [WithResult a] → ShowS # | |
| Eq a ⇒ Eq (WithResult a) Source # | |
Defined in Test.Cardano.Protocol.Crypto.VRF.Fake | |