40 #ifndef __CAASYMCIPHER__
41 #define __CAASYMCIPHER__
61 #if !defined ONLY_LOCAL_PROXY || defined INCLUDE_MIDDLE_MIX
65 #if !defined ONLY_LOCAL_PROXY || defined INCLUDE_MIDDLE_MIX
67 SINT32 addKeyPart(DOMElement *elemRoot, XERCES_CPP_NAMESPACE::DOMDocument *docOwner,
68 const char *partName, BIGNUM *part);
70 #ifndef ONLY_LOCAL_PROXY
74 #ifdef EXPORT_ASYM_PRIVATE_KEY
76 SINT32 getPrivateKeyAsDOMElement(DOMElement *&elemRoot,
77 XERCES_CPP_NAMESPACE::DOMDocument *docOwner);
79 SINT32 setPrivateKeyAsDOMNode(DOMNode *node);
void setRSAFlags(RSA *pRSA)
static SINT32 testSpeed()
SINT32 getPublicKeyAsXML(UINT8 *buff, UINT32 *len)
Stores the public key in buff.
SINT32 addKeyPart(DOMElement *elemRoot, XERCES_CPP_NAMESPACE::DOMDocument *docOwner, const char *partName, BIGNUM *part)
SINT32 encryptPKCS1(const UINT8 *from, UINT32 fromlen, UINT8 *to, UINT32 *len)
Encrypts one block of plain text using PKCS1 padding.
SINT32 getPublicKeyAsDOMElement(DOMElement *&elemRoot, XERCES_CPP_NAMESPACE::DOMDocument *docOwner)
SINT32 setPublicKeyAsDOMNode(DOMNode *node)
SINT32 setPublicKeyAsXML(const UINT8 *buff, UINT32 len)
Sets the public key to the values stored in key.
SINT32 generateKeyPair(UINT32 size)
Generates a new random key-pair of size bits.
SINT32 decryptOAEP(const UINT8 *from, UINT8 *to, UINT32 *len)
Decrypts one OAEP encoded block which is stored in from.
SINT32 encryptOAEP(const UINT8 *from, UINT32 fromlen, UINT8 *to, UINT32 *len)
Encrypts one block of plain text using OAEP padding.
SINT32 decrypt(const UINT8 *from, UINT8 *to)
Decrypts exactly one block which is stored in from.
SINT32 encrypt(const UINT8 *from, UINT8 *to)
Encrypts exactly one block which is stored in from.
SINT32 setPublicKey(const CACertificate *pCert)
Sets the public key which is used for encryption to the contained in the provided certificate.
SINT32 getKeyPart(BIGNUM **part, DOMNode *node)