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
- data Sig
- sign :: Signable a => PrvKey -> a -> Sig
- verify :: Signable a => PubKey -> Sig -> a -> Bool
- importSigDer :: Alg -> ByteString -> Maybe Sig
- exportSigDer :: Sig -> ByteString
- class Signable a where
- toBinary :: a -> ByteString
- pubKey2Alg :: PubKey -> Alg
- prvKey2Alg :: PrvKey -> Alg
- sig2Alg :: Sig -> Alg
- 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 #
Signature
importSigDer :: Alg -> ByteString -> Maybe Sig Source #
exportSigDer :: Sig -> ByteString Source #
Class
class Signable a where Source #
toBinary :: a -> ByteString Source #
Instances
Util
pubKey2Alg :: PubKey -> Alg Source #
prvKey2Alg :: PrvKey -> Alg 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 # |