Class Signature
Definition
- Namespace:
- Tizen.Security.SecureRepository.Crypto
- Assembly:
- Tizen.Security.SecureRepository.dll
- API Level:
- 3
This class provides the methods for creating and verifying a signature.
C#Copypublic class Signature : object
- Inheritance
-
Signature
Constructors
Signature(SignatureParameters)
A constructor of Signature that takes the algorithm specific parameters.
Declaration
C#Copypublic Signature(SignatureParameters parameters)
Parameters
Type | Name | Description |
---|---|---|
SignatureParameters | parameters | The algorithm specific parameters. |
API Level: 3
Properties
Declaration
C#Copypublic SignatureParameters Parameters { get; }
Property Value
Type | Description |
---|---|
SignatureParameters |
API Level: 3
Methods
Sign(String, String, Byte[])
Creates a signature on a given message using a private key and returns the signature.
Declaration
C#Copypublic byte[] Sign(string privateKeyAlias, string password, byte[] message)
Parameters
Type | Name | Description |
---|---|---|
String | privateKeyAlias | The name of private key. |
String | password | The password used in decrypting a private key value. |
Byte[] | message | The message that is signed with a private key. |
Returns
Type | Description |
---|---|
Byte[] | A newly created signature. |
Remarks
The key type specified by the privateKeyAlias should be compatible with the algorithm specified in Parameters.
API Level: 3
Verify(String, String, Byte[], Byte[])
Verifies a given signature on a given message using a public key and returns the signature status.
Declaration
C#Copypublic bool Verify(string publicKeyAlias, string password, byte[] message, byte[] signature)
Parameters
Type | Name | Description |
---|---|---|
String | publicKeyAlias | The name of public key. |
String | password | The password used in decrypting a public key value. |
Byte[] | message | The input on which the signature is created. |
Byte[] | signature | The signature that is verified with public key. |
Returns
Type | Description |
---|---|
Boolean | The signature status. True is returned when the signature is valid. |
Remarks
The key type specified by publicKeyAlias should be compatible with the algorithm specified in Parameters.