MCTSigner Class Reference
class MCTSigner : public MCTTokenObject
|
A template for signer objects. It isn't possible to use a base class as the signature objects created are not related.
This template is be instantiated with a CRSASignature* as the signature class for RSA signatures and with a CDSASignature* as the Signature for DSA.
Constructor & Destructor Documentation
MCTSigner(MCTToken &)
MCTSigner
|
(
|
MCTToken
&
|
aToken
|
)
|
[protected, inline]
|
~MCTSigner()
~MCTSigner
|
(
|
)
|
[protected, inline, pure virtual]
|
Member Functions Documentation
CancelSign()
void
|
CancelSign
|
(
|
)
|
[pure virtual]
|
Sign(const TDesC8 &, Signature &, TRequestStatus &)
void
|
Sign
|
(
|
const
TDesC8
&
|
aPlaintext,
|
|
Signature &
|
aSignature,
|
|
TRequestStatus
&
|
aStatus
|
|
)
|
[pure virtual]
|
Perform a raw signing operation.
-
capability
-
Dependent Requires the caller to have any capabilities specified in the key use security policy.
-
leave
-
KErrPermissionDenied If the caller does not conform to the key use security policy.
-
leave
-
KErrBadPassphrase If the user failed to enter the correct passphrase.
Parameters
const
TDesC8
& aPlaintext
|
The string to be signed - this should be some form of hash of the actual message to be signed. In order to generate valid PKCS#1 v1.5 signature aPlainText should consist of ASN.1 encoded digest algorithm ID and hash as described in RFC2313. If the data is too long, this method will return KErrOverflow through aStatus.
|
Signature & aSignature
|
The returned signature. A new signature object is created which is owned by the caller.
|
TRequestStatus
& aStatus
|
|
SignMessage(const TDesC8 &, Signature &, TRequestStatus &)
void
|
SignMessage
|
(
|
const
TDesC8
&
|
aPlaintext,
|
|
Signature &
|
aSignature,
|
|
TRequestStatus
&
|
aStatus
|
|
)
|
[pure virtual]
|
Sign some data.
The data is hashed before the signature is created using the SHA-1 algorithm.
-
capability
-
Dependent Requires the caller to have any capabilities specified in the key use security policy.
-
leave
-
KErrPermissionDenied If the caller does not conform to the key use security policy.
-
leave
-
KErrBadPassphrase If the user failed to enter the correct passphrase.
Parameters
const
TDesC8
& aPlaintext
|
The string to be signed.
|
Signature & aSignature
|
The returned signature. A new signature object is created which is owned by the caller.
|
TRequestStatus
& aStatus
|
|
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.