cardano-crypto-1.1.1: Cryptography primitives for cardano
Safe Haskell None
Language Haskell2010

Crypto.Math.Bits

Synopsis

Documentation

data FBits (n :: Nat ) Source #

Finite Bits

Sadly Bits is taken by Bits operation

Constructors

FBits

Instances

Instances details
GetDerivationMaterial ' Hard Key Source #
Instance details

Defined in Crypto.ECC.Ed25519BIP32

GetDerivationMaterial ' Soft PointCompressed Source #
Instance details

Defined in Crypto.ECC.Ed25519BIP32

GetDerivationMaterial ' Soft Key Source #
Instance details

Defined in Crypto.ECC.Ed25519BIP32

SizeValid n => Bounded ( FBits n) Source #
Instance details

Defined in Crypto.Math.Bits

SizeValid n => Enum ( FBits n) Source #
Instance details

Defined in Crypto.Math.Bits

Eq ( FBits n) Source #
Instance details

Defined in Crypto.Math.Bits

SizeValid n => Num ( FBits n) Source #
Instance details

Defined in Crypto.Math.Bits

Ord ( FBits n) Source #
Instance details

Defined in Crypto.Math.Bits

Show ( FBits n) Source #
Instance details

Defined in Crypto.Math.Bits

SizeValid n => Bits ( FBits n) Source #
Instance details

Defined in Crypto.Math.Bits

data FBitsK Source #

Constructors

FBitsK ( forall n. ( KnownNat n, SizeValid n) => FBits n)

splitHalf :: forall m n. ( SizeValid n, (n * 2) ~ m) => FBits m -> ( FBits n, FBits n) Source #

append :: forall m n r. ( SizeValid m, SizeValid n, SizeValid r, (m + n) ~ r) => FBits n -> FBits m -> FBits r Source #

Append 2 FBits together where the left member is shifted to make room for the right element.

e.g. append (0x1 :: FBits 1) (0x70 :: FBits 7) = 0xf0 :: FBits 8

dropBitsOnRight :: forall a b diff. ( KnownNat diff, b <= a, SizeValid a, SizeValid b, (a - b) ~ diff) => FBits a -> FBits b Source #