TalanSoft Toolkits  201707
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Member Functions | List of all members
iCrypto Struct Referenceabstract
Inheritance diagram for iCrypto:
iUnknown

Public Member Functions

virtual cString Digest (const achar *aaszData, const achar *aType, eRawToStringEncoding aEncoding=eRawToStringEncoding_Hex)=0
 Compute the hash of the specified string. Does not include the end zero. More...
 
virtual cString DigestRaw (const tPtr apData, tSize anSize, const achar *aType, eRawToStringEncoding aEncoding)=0
 Compute the hash of the specified data. More...
 
virtual cString DigestFile (iFile *apFile, tSize anSize, const achar *aType, eRawToStringEncoding aEncoding)=0
 Compute the hash of the specified data read from the specified file. More...
 
virtual iCryptoRandCreateRand ()=0
 Create a new random number generator. More...
 
virtual iCryptoRandGetRand ()=0
 Get the default crypto random number generator. {Property}. More...
 
virtual cString KDFGenSaltBlowfish (iCryptoRand *apRand, tU32 aRounds)=0
 Generate a salt for KDFCrypt. More...
 
virtual cString KDFCrypt (const achar *aKey, const achar *aSalt)=0
 Calculates a crypt(3)-style hash of password. More...
 
virtual tBool SigVerify (const achar *signatureHex, const achar *publicKeyPEM, const achar *payload)=0
 Verify a RSA signature for a specified payload. More...
 
- Public Member Functions inherited from iUnknown
virtual tBool IsOK () const =0
 Check if the object is valid. More...
 
virtual tI32 AddRef ()=0
 Signal that one more reference of the object has been created. More...
 
virtual tI32 Release ()=0
 Release a reference of the object. More...
 
virtual void DeleteThis ()=0
 Bypass any reference counting and delete this object. More...
 
virtual void Invalidate ()=0
 Invalidate the object. More...
 
virtual iUnknownQueryInterface (const tUUID &aIID)=0
 Query an interface. More...
 
virtual void ListInterfaces (iMutableCollection *apLst, tU32 anFlags) const =0
 Fill a UUID list containing the UUIDs of the implemented interfaces. More...
 
virtual tI32 SetNumRefs (tI32 anNumRefs)=0
 Set the reference counter directly. More...
 
virtual tI32 GetNumRefs () const =0
 Get the number of references to this object. More...
 

Member Function Documentation

virtual cString Digest ( const achar aaszData,
const achar aType,
eRawToStringEncoding  aEncoding = eRawToStringEncoding_Hex 
)
pure virtual

Compute the hash of the specified string. Does not include the end zero.

virtual cString DigestRaw ( const tPtr  apData,
tSize  anSize,
const achar aType,
eRawToStringEncoding  aEncoding 
)
pure virtual

Compute the hash of the specified data.

virtual cString DigestFile ( iFile apFile,
tSize  anSize,
const achar aType,
eRawToStringEncoding  aEncoding 
)
pure virtual

Compute the hash of the specified data read from the specified file.

virtual iCryptoRand* CreateRand ( )
pure virtual

Create a new random number generator.

virtual iCryptoRand* GetRand ( )
pure virtual

Get the default crypto random number generator. {Property}.

virtual cString KDFGenSaltBlowfish ( iCryptoRand apRand,
tU32  aRounds 
)
pure virtual

Generate a salt for KDFCrypt.

See also
CryptoKDFGenSaltBlowfish
Remarks
If apRand is NULL the default random number generator is used.
virtual cString KDFCrypt ( const achar aKey,
const achar aSalt 
)
pure virtual

Calculates a crypt(3)-style hash of password.

See also
CryptoKDFCrypt
virtual tBool SigVerify ( const achar signatureHex,
const achar publicKeyPEM,
const achar payload 
)
pure virtual

Verify a RSA signature for a specified payload.