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

Crypto.Math.Bytes

Synopsis

Documentation

packSome :: ( forall n. KnownNat n => Bytes n -> a) -> [ Word8 ] -> a Source #

fromBits :: forall n. KnownNat n => Endian -> FBits n -> Bytes ( Div8 n) Source #

transform bits into bytes with a specific endianness

toBits :: Endian -> Bytes n -> FBits (n * 8) Source #

transform bytes into bits with a specific endianness

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

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