#include <mw/sencryptoutils.h>
class SenCryptoUtils |
Public Member Functions | |
---|---|
IMPORT_C HBufC8 * | CreateEncodedBinarySecretL(const TDesC8 &, const TDesC8 &) |
IMPORT_C HBufC8 * | DecodeBase64L(const TDesC8 &) |
IMPORT_C HBufC8 * | EncodeBase64L(const TDesC8 &) |
IMPORT_C HBufC8 * | GetPSHA1HashL(const TDesC8 &, const TDesC8 &, const TInt) |
IMPORT_C HBufC8 * | GetRandomNonceL() |
IMPORT_C HBufC8 * | GetTimestampL() |
IMPORT_C HBufC8 * | GetTimestampL(TTime) |
IMPORT_C HBufC8 * | RandomAndHashMd5LC() |
Set of static convenience methods to help in cryptography
IMPORT_C HBufC8 * | GetPSHA1HashL | ( | const TDesC8 & | aSecret, |
const TDesC8 & | aSeed, | |||
const TInt | aLength | |||
) | [static] |
Algorithm taken from of TLS specification RFC 2246 - 5.HMAC and the pseudorandom function
P_hash(secret, seed) = HMAC_hash(secret, A(1) + seed) + HMAC_hash(secret, A(2) + seed) + HMAC_hash(secret, A(3) + seed) + ...
Where + indicates concatenation.
A() is defined as: A(0) = seed A(i) = HMAC_hash(secret, A(i-1))
Parameter | Description |
---|---|
aSecret | - secret |
aSeed | - seed |
aLength | - length of new secret |