Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data PubKey
- data PrvKey
- importPubKeyDer :: Alg -> ByteString -> Maybe PubKey
- importPubKeyPem :: Alg -> ByteString -> Either SignableError PubKey
- exportPubKeyDer :: ECPointFormat -> PubKey -> ByteString
- derivePubKey :: PrvKey -> PubKey
- importPrvKeyRaw :: Alg -> ByteString -> Maybe PrvKey
- importPrvKeyPem :: Alg -> ByteString -> Either SignableError PrvKey
- exportPrvKeyRaw :: PrvKey -> ByteString
- newRandomPrvKey :: (MonadIO m, MonadFail m) => Alg -> m PrvKey
- newtype Sha256 = Sha256 ByteString
- data Sig
- importSigDer :: Alg -> ByteString -> Maybe Sig
- exportSigDer :: Sig -> ByteString
- class Signable a where
- data Alg = AlgSecp256k1
- data SignableError
- data ECPointFormat
Key
importPubKeyDer :: Alg -> ByteString -> Maybe PubKey Source #
importPubKeyPem :: Alg -> ByteString -> Either SignableError PubKey Source #
exportPubKeyDer :: ECPointFormat -> PubKey -> ByteString Source #
derivePubKey :: PrvKey -> PubKey Source #
importPrvKeyRaw :: Alg -> ByteString -> Maybe PrvKey Source #
importPrvKeyPem :: Alg -> ByteString -> Either SignableError PrvKey Source #
exportPrvKeyRaw :: PrvKey -> ByteString Source #
Sha256
Signature
importSigDer :: Alg -> ByteString -> Maybe Sig Source #
exportSigDer :: Sig -> ByteString Source #
Class
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 # | |
Misc
data SignableError Source #
InvalidPem | |
TooFewPemChunks | |
TooManyPemChunks | |
InvalidAsn1 | |
TooFewAsn1Chunks | |
TooManyAsn1Chunks | |
InvalidPubKeyDer | |
InvalidPrvKeyRaw |
Instances
Show SignableError Source # | |
Defined in Data.Signable.Class showsPrec :: Int -> SignableError -> ShowS # show :: SignableError -> String # showList :: [SignableError] -> ShowS # |
data ECPointFormat Source #
Instances
Eq ECPointFormat Source # | |
Defined in Data.Signable.Class (==) :: ECPointFormat -> ECPointFormat -> Bool # (/=) :: ECPointFormat -> ECPointFormat -> Bool # | |
Show ECPointFormat Source # | |
Defined in Data.Signable.Class showsPrec :: Int -> ECPointFormat -> ShowS # show :: ECPointFormat -> String # showList :: [ECPointFormat] -> ShowS # |