cardano-crypto-class-2.0.0.0.1: Type classes abstracting over cryptography primitives for Cardano
Safe Haskell None
Language Haskell2010

Cardano.Crypto.Util

Synopsis

Documentation

class Empty a Source #

Instances

Instances details
Empty a Source #
Instance details

Defined in Cardano.Crypto.Util

class SignableRepresentation a where Source #

A class of types that have a representation in bytes that can be used for signing and verifying.

Simple serialisation used in mock instances

Low level conversions

bytesToNatural :: ByteString -> Natural Source #

Create a Natural out of a ByteString , in big endian.

This is fast enough to use in production.

naturalToBytes :: Int -> Natural -> ByteString Source #

The inverse of bytesToNatural . Note that this is a naive implementation and only suitable for tests.

ByteString manipulation