openpgp-Crypto 0.5 → 0.6
raw patch · 3 files changed
+20/−14 lines, 3 filesdep ~openpgp
Dependency ranges changed: openpgp
Files
- Data/OpenPGP/Crypto.hs +6/−2
- README +9/−9
- openpgp-Crypto.cabal +5/−3
Data/OpenPGP/Crypto.hs view
@@ -79,6 +79,8 @@ where t = emsa_pkcs1_v1_5_hash_padding algo ++ hash algo m -- | Verify a message signature. Only supports RSA keys for now.+-- This function is partial on messages that contain signatures other than+-- on literal data. verify :: OpenPGP.Message -- ^ Keys that may have made the signature -> OpenPGP.Message -- ^ LiteralData message to verify -> Int -- ^ Index of signature to verify (0th, 1st, etc)@@ -94,8 +96,10 @@ Just k = find_key keys issuer Just issuer = OpenPGP.signature_issuer sig sig = sigs !! sigidx- (sigs, (OpenPGP.LiteralDataPacket {OpenPGP.content = dta}):_) =- OpenPGP.signatures_and_data message+ (OpenPGP.DataSignature {+ OpenPGP.literal = OpenPGP.LiteralDataPacket {OpenPGP.content = dta},+ OpenPGP.signatures_over = sigs+ }:_) = OpenPGP.signatures message -- | Sign data or key/userID pair. Only supports RSA keys for now. sign :: OpenPGP.Message -- ^ SecretKeys, one of which will be used
README view
@@ -1,9 +1,9 @@-This is a wrapper around <http://hackage.haskell.org/package/Crypto>-that currently does fingerprint generation, signature generation, and-signature verification (for RSA keys only).--It is indended to be used with <http://hackage.haskell.org/package/openpgp>--It is intended that you use qualified imports with this library.--> import qualified Data.OpenPGP.Crypto as OpenPGP+ This is a wrapper around <http://hackage.haskell.org/package/Crypto>+ that currently does fingerprint generation, signature generation, and+ signature verification (for RSA keys only).+ .+ It is indended to be used with <http://hackage.haskell.org/package/openpgp>+ .+ It is intended that you use qualified imports with this library.+ .+ > import qualified Data.OpenPGP.Crypto as OpenPGP
openpgp-Crypto.cabal view
@@ -1,5 +1,5 @@ name: openpgp-Crypto-version: 0.5+version: 0.6 cabal-version: >= 1.8 license: OtherLicense license-file: COPYING@@ -39,6 +39,7 @@ tests/data/compressedsig-bzip2.gpg library+ ghc-options: -fno-warn-tabs exposed-modules: Data.OpenPGP.Crypto @@ -47,19 +48,20 @@ bytestring, utf8-string, binary,- openpgp <= 0.5,+ openpgp == 0.6.*, Crypto test-suite tests type: exitcode-stdio-1.0 main-is: tests/suite.hs+ ghc-options: -fno-warn-tabs build-depends: base == 4.*, bytestring, utf8-string, binary,- openpgp <= 0.5,+ openpgp == 0.6.*, Crypto, HUnit, QuickCheck >= 2.4.1.1,