CryptoSpi::MHash Class Reference
class CryptoSpi::MHash : public CryptoSpi::MPlugin
|
The generic CryptoSPI hash definition. Intended to allow plug-ins to implement extensible hash functionality, and to work with all known existing hashing algorithms, e.g. MD2, MD4, MD5, SHA-1, SHA-256, SHA-512, RIPEMD-160, etc.
Member Functions Documentation
CopyL()
MHash
*
|
CopyL
|
(
|
)
|
[pure virtual]
|
Creates a new
MHash
object with the exact same state as the current object.
This function copies all internal state of the message digest. To create a new
MHash
object without the state of the current object, see
ReplicateL()
.
-
leave
-
... Any of the crypto error codes defined in cryptospi_errs.h or any of the system-wide error codes.
Final(const TDesC8 &)
Produces a final hash value from all the previous updates of data to be hashed.
Parameters
const
TDesC8
& aMessage
|
The data to be included in the hash.
|
Hash(const TDesC8 &)
Adds aMessage to the internal representation of data to be hashed, then returns a
TPtrC8
of the finalised hash of all the previously appended messages.
Parameters
const
TDesC8
& aMessage
|
The data to be included in the hash.
|
ReplicateL()
MHash
*
|
ReplicateL
|
(
|
)
|
[pure virtual]
|
Creates a brand new reset
MHash
object containing no state information from the current object.
To make a copy of a message digest with its internal state intact, see
CopyL()
.
-
leave
-
... Any of the crypto error codes defined in cryptospi_errs.h or any of the system-wide error codes.
SetKeyL(const CKey &)
void
|
SetKeyL
|
(
|
const
CKey
&
|
aKey
|
)
|
[pure virtual]
|
Set the key used for HMAC mode operation.
-
leave
-
KErrArgument if aKey is not of the expected type.
-
leave
-
KErrNotSupported if the key is not of valid length.
-
leave
-
... Any of the crypto error codes defined in cryptospi_errs.h or any of the system-wide error codes.
Parameters
const
CKey
& aKey
|
The key for HMAC
|
SetOperationModeL(TUid)
void
|
SetOperationModeL
|
(
|
TUid
|
aOperationMode
|
)
|
[pure virtual]
|
Set the operation mode, ie hash or hmac
-
leave
-
KErrNotSupported if the operation mode is not supported.
-
leave
-
... Any of the crypto error codes defined in cryptospi_errs.h or any of the system-wide error codes.
Parameters
TUid
aOperationMode
|
The UID to identifiy the operation mode
|
Update(const TDesC8 &)
void
|
Update
|
(
|
const
TDesC8
&
|
aMessage
|
)
|
[pure virtual]
|
Adds data to the internal representation of messages to be hashed.
Parameters
const
TDesC8
& aMessage
|
The data to be included in the hash.
|
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.