openpgp-Crypto-0.6: Implementation of cryptography for use with OpenPGP using the Crypto library

Safe HaskellNone



This is a wrapper around that currently does fingerprint generation and signature verification.

The recommended way to import this module is:

import qualified Data.OpenPGP.Crypto as OpenPGP



sign Source #


:: Message

SecretKeys, one of which will be used

-> Message

Message containing data or key to sign, and optional signature packet

-> HashAlgorithm

HashAlgorithm to use in signature

-> String

KeyID of key to choose or [] for first

-> Integer

Timestamp for signature (unless sig supplied)

-> Packet 

Sign data or key/userID pair. Only supports RSA keys for now.

verify Source #


:: Message

Keys that may have made the signature

-> Message

LiteralData message to verify

-> Int

Index of signature to verify (0th, 1st, etc)

-> Bool 

Verify a message signature. Only supports RSA keys for now. This function is partial on messages that contain signatures other than on literal data.

fingerprint :: Packet -> String Source #

Generate a key fingerprint from a PublicKeyPacket or SecretKeyPacket