40 { |
40 { |
41 public: |
41 public: |
42 /** |
42 /** |
43 Set the padding mode for the signer or verifier. Reset() is called to reinitialise the cipher. |
43 Set the padding mode for the signer or verifier. Reset() is called to reinitialise the cipher. |
44 @param aPaddingMode The padding mode of the signer |
44 @param aPaddingMode The padding mode of the signer |
|
45 @leave KErrNotSupported if the padding mode is not supported. |
|
46 @leave ... Any of the crypto error codes defined in |
|
47 cryptospi_errs.h or any of the system-wide error codes. |
45 */ |
48 */ |
46 virtual void SetPaddingModeL(TUid aPaddingMode) = 0; |
49 virtual void SetPaddingModeL(TUid aPaddingMode) = 0; |
47 |
50 |
48 /** |
51 /** |
49 Set the private key for the signer or verifier. Reset() is called to reinitialise the cipher. |
52 Set the private key for the signer or verifier. Reset() is called to reinitialise the cipher. |
50 @param aPrivateKey The privatekey that used to sign |
53 @param aPrivateKey The privatekey that used to sign |
|
54 @leave KErrArgument if key is not of the expected type. |
|
55 @leave KErrNotSupported if the key is not of valid length. |
|
56 @leave ... Any of the crypto error codes defined in |
|
57 cryptospi_errs.h or any of the system-wide error codes. |
51 */ |
58 */ |
52 virtual void SetKeyL(const CKey& aPrivateKey) = 0; |
59 virtual void SetKeyL(const CKey& aPrivateKey) = 0; |
53 |
60 |
54 /** |
61 /** |
55 Gets the maximum size of input accepted by this object. |
62 Gets the maximum size of input accepted by this object. |
56 @return The maximum length allowed in bytes |
63 @return The maximum length allowed in bytes |
|
64 @leave ... Any of the crypto error codes defined in |
|
65 cryptospi_errs.h or any of the system-wide error codes. |
57 */ |
66 */ |
58 virtual TInt GetMaximumInputLengthL() const = 0; |
67 virtual TInt GetMaximumInputLengthL() const = 0; |
59 |
68 |
60 /** |
69 /** |
61 Gets the maximum size of output that can be generated by this object. |
70 Gets the maximum size of output that can be generated by this object. |
62 @return The maximum output length in bytes |
71 @return The maximum output length in bytes |
|
72 @leave ... Any of the crypto error codes defined in |
|
73 cryptospi_errs.h or any of the system-wide error codes. |
63 */ |
74 */ |
64 virtual TInt GetMaximumOutputLengthL() const = 0; |
75 virtual TInt GetMaximumOutputLengthL() const = 0; |
65 }; |
76 }; |
66 |
77 |
67 class MSigner : public MSignatureBase |
78 class MSigner : public MSignatureBase |
70 |
81 |
71 /** |
82 /** |
72 Signs the input hash |
83 Signs the input hash |
73 @param aInput The hash of the message to sign |
84 @param aInput The hash of the message to sign |
74 @param aSignature The signature of the hash |
85 @param aSignature The signature of the hash |
|
86 @leave ... Any of the crypto error codes defined in |
|
87 cryptospi_errs.h or any of the system-wide error codes. |
75 */ |
88 */ |
76 virtual void SignL(const TDesC8& aInput, CCryptoParams& aSignature) = 0; |
89 virtual void SignL(const TDesC8& aInput, CCryptoParams& aSignature) = 0; |
77 }; |
90 }; |
78 |
91 |
79 |
92 |
84 /** |
97 /** |
85 Set the public key for the signer |
98 Set the public key for the signer |
86 @param aInput The hash of the message to sign |
99 @param aInput The hash of the message to sign |
87 @param aSignature The signature of the hash |
100 @param aSignature The signature of the hash |
88 @param aRequestStatus |
101 @param aRequestStatus |
|
102 @leave ... Any of the crypto error codes defined in |
|
103 cryptospi_errs.h or any of the system-wide error codes. |
89 */ |
104 */ |
90 virtual void SignL(const TDesC8& aInput, CCryptoParams& aSignature, TRequestStatus& aRequestStatus) = 0; |
105 virtual void SignL(const TDesC8& aInput, CCryptoParams& aSignature, TRequestStatus& aRequestStatus) = 0; |
91 |
106 |
92 /** |
107 /** |
93 Cancel the outstanding request |
108 Cancel the outstanding request |