Safe Haskell | None |
---|---|
Language | Haskell2010 |
Digital signature is common security-related practice.
One of the main difficulties of digital signature usage
is necessity of determenistic data serialization agreement.
This library provides Signable
class which represents
the idea of such agreement. Also worth mentioning generic
proto-lens compatible implementation
of serialization/signing algorithm described here.
It's implemented as separate protoc plugin signable-haskell-protoc
which generates Signable
class instances for given proto-lens messages and enums.
Documentation
class Signable a where Source #
toBinary :: a -> ByteString Source #
toSha256 :: a -> Sha256 Source #
Instances
Signable Bool Source # | |
Signable Double Source # | |
Signable Float Source # | |
Signable Int32 Source # | |
Signable Int64 Source # | |
Signable Word32 Source # | |
Signable Word64 Source # | |
Signable ByteString Source # | |
Defined in Data.Signable.Class toBinary :: ByteString -> ByteString Source # toSha256 :: ByteString -> Sha256 Source # | |
Signable ByteString Source # | |
Defined in Data.Signable.Class toBinary :: ByteString -> ByteString0 Source # toSha256 :: ByteString -> Sha256 Source # | |
Signable Text Source # | |
(Foldable f, Signable a) => Signable (f a) Source # | |
importPubKeyRaw :: Alg -> ByteString -> Maybe PubKey Source #
importPubKeyPem :: Alg -> ByteString -> Either SE PubKey Source #
derivePubKey :: PrvKey -> PubKey Source #
importPrvKeyRaw :: Alg -> ByteString -> Maybe PrvKey Source #
importPrvKeyPem :: Alg -> ByteString -> Either SE PrvKey Source #
importSigDer :: Alg -> ByteString -> Maybe Sig Source #
exportSigDer :: Sig -> ByteString Source #