summaryrefslogtreecommitdiff
path: root/dsa.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2015-11-19 13:09:33 -0500
committerJeffrey Walton <noloader@gmail.com>2015-11-19 13:09:33 -0500
commitb3e49d8c96bb8044715db457d04669b42b169fab (patch)
tree67ca70a2b55a656d79641c3771ec49751993fa4b /dsa.h
parent6911cc9e91e3b7a382030cedc55438ad8b7405ca (diff)
downloadcryptopp-git-b3e49d8c96bb8044715db457d04669b42b169fab.tar.gz
Additional documentation; fixed issues with Clang integrated assembler and different versions numbers for LLVM Clang and Apple Clang; fixed missing header in DSA class
Diffstat (limited to 'dsa.h')
-rw-r--r--dsa.h30
1 files changed, 24 insertions, 6 deletions
diff --git a/dsa.h b/dsa.h
index 3b530f27..a4ab4e97 100644
--- a/dsa.h
+++ b/dsa.h
@@ -2,20 +2,38 @@
//! \file
//! \headerfile dsa.h
-//! \brief Classes for DSA signature algorithm
+//! \brief Classes for the DSA signature algorithm
#ifndef CRYPTOPP_DSA_H
#define CRYPTOPP_DSA_H
#include "cryptlib.h"
+#include "gfpcrypt.h"
NAMESPACE_BEGIN(CryptoPP)
-/*! The DSA signature format used by Crypto++ is as defined by IEEE P1363.
- Java uses the DER format, and OpenPGP uses the OpenPGP format. */
-enum DSASignatureFormat {DSA_P1363, DSA_DER, DSA_OPENPGP};
-/** This function converts between these formats, and returns length of signature in the target format.
- If toFormat == DSA_P1363, bufferSize must equal publicKey.SignatureLength() */
+//! \brief DSA Signature Format
+//! \details The DSA signature format used by Crypto++ is as defined by IEEE P1363.
+//! Java nad .Net use the DER format, and OpenPGP uses the OpenPGP format.
+enum DSASignatureFormat {
+ //! \brief Crypto++ native signature encoding format
+ DSA_P1363,
+ //! \brief signature encoding format used by Java and .Net
+ DSA_DER,
+ //! \brief OpenPGP signature encoding format
+ DSA_OPENPGP
+};
+
+//! \brief Converts between signature encoding formats
+//! \param buffer byte buffer for the converted signature encoding
+//! \param bufferSize the length of the converted signature encoding buffer
+//! \param toFormat the source signature format
+//! \param signature byte buffer for the existing signature encoding
+//! \param signatureLen the length of the existing signature encoding buffer
+//! \param fromFormat the source signature format
+//! \details This function converts between these formats, and returns length
+//! of signature in the target format. If <tt>toFormat == DSA_P1363</tt>, then
+//! <tt>bufferSize</tt> must equal <tt>publicKey.SignatureLength()</tt>
size_t DSAConvertSignatureFormat(byte *buffer, size_t bufferSize, DSASignatureFormat toFormat,
const byte *signature, size_t signatureLen, DSASignatureFormat fromFormat);