More API documentation

svn path=/trunk/kdesupport/qca/; revision=378645
This commit is contained in:
Brad Hards 2005-01-15 06:06:04 +00:00
parent 8d83cdfbb1
commit d5df8abd14
2 changed files with 53 additions and 32 deletions

View File

@ -118,46 +118,59 @@ namespace QCA
IETF_4096 IETF_4096
}; };
/**
Encryption algorithms
*/
enum EncAlgo enum EncAlgo
{ {
EME_PKCS1v15, EME_PKCS1v15, ///< Block type 2 (PKCD1, Version 1.5)
EME_PKCS1_OAEP EME_PKCS1_OAEP ///< Optimal asymmetric encryption padding (PKCS1, Version 2.0)
}; };
/**
Signature algorithm variants
*/
enum SignAlgo enum SignAlgo
{ {
SignUnknown, SignUnknown, ///< Unknown signing algorithm
EMSA1_SHA1, // usual dsa EMSA1_SHA1, ///< SHA1, with EMSA1 (IEEE1363-2000) encoding (this is the usual DSA algorithm - FIPS186)
EMSA3_SHA1, EMSA3_SHA1, ///< SHA1, with EMSA3 (ie PKCS1 Version 1.5) encoding
EMSA3_MD5, // usual rsa EMSA3_MD5, ///< MD5, with EMSA3 (ie PKCS1 Version 1.5) encoding (this is the usual RSA algorithm)
EMSA3_MD2, EMSA3_MD2, ///< MD2, with EMSA3 (ie PKCS1 Version 1.5) encoding
EMSA3_RIPEMD160 EMSA3_RIPEMD160 ///< RIPEMD160, with EMSA3 (ie PKCS1 Version 1.5) encoding
}; };
/**
The validity (or otherwise) of a certificate
*/
enum CertValidity enum CertValidity
{ {
Valid, Valid, ///< The certificate is valid
Rejected, Rejected, ///< The root CA rejected the certificate purpose
Untrusted, Untrusted, ///< The certificate is not trusted
SignatureFailed, SignatureFailed, ///< The signature does not match
InvalidCA, InvalidCA, ///< The Certificate Authority is invalid
InvalidPurpose, InvalidPurpose, ///< The purpose does not match the intended usage
SelfSigned, SelfSigned, ///< The certificate is self-signed, and is not
Revoked, ///< found in the list of trusted certificates
PathLengthExceeded, Revoked, ///< The certificate has been revoked
Expired, PathLengthExceeded, ///< The path length from the root CA to this certificate is too long
Unknown Expired, ///< The certificate has expired
Unknown ///< Validity is unknown
}; };
/**
Specify the intended usage of a certificate
*/
enum CertUsage enum CertUsage
{ {
Any = 0x00, Any = 0x00, ///< Any application, or unspecified
TLSServer = 0x01, TLSServer = 0x01, ///< server side of a TLS or SSL connection
TLSClient = 0x02, TLSClient = 0x02, ///< client side of a TLS or SSL connection
CodeSigning = 0x04, CodeSigning = 0x04, ///< code signing certificate
EmailProtection = 0x08, EmailProtection = 0x08, ///< email (S/MIME) certificate
TimeStamping = 0x10, TimeStamping = 0x10, ///< time stamping certificate
CRLSigning = 0x20 CRLSigning = 0x20 ///< certificate revocation list signing certificate
}; };
/** /**

View File

@ -89,17 +89,25 @@ namespace QCA
EncryptThenSign, EncryptThenSign,
SignThenEncrypt SignThenEncrypt
}; };
/**
Formats for secure messages
*/
enum Format enum Format
{ {
Binary, // DER/binary Binary, ///< DER/binary
Ascii // PEM/ascii-armored Ascii ///< PEM/ascii-armored
}; };
/**
Errors for secure messages
*/
enum Error enum Error
{ {
ErrPassphrase, // passphrase was either wrong or not provided ErrPassphrase, ///< passphrase was either wrong or not provided
ErrFormat, // input format was bad ErrFormat, ///< input format was bad
ErrSigner, // signing key is expired or invalid ErrSigner, ///< signing key is expired or invalid
ErrUnknown // other error ErrUnknown ///< other error
}; };
enum VerifyResult enum VerifyResult
{ {