Codeunit DSACryptoServiceProvider
Defines a wrapper object to access the cryptographic service provider (CSP) implementation of the DSA algorithm.
Properties
| Name | Value |
|---|---|
| Access | Public |
| InherentEntitlements | X |
| InherentPermissions | X |
Methods
ToXmlString
Creates and returns an XML string representation of the current DSA object.
[NonDebuggable]
procedure ToXmlString(IncludePrivateParameters: Boolean): Text
Parameters
| Name | Type | Description |
|---|---|---|
| IncludePrivateParameters | Boolean |
true to include private parameters; otherwise, false. |
Returns
| Type | Description |
|---|---|
| Text |
An XML string encoding of the current DSA object. |
SignData
Computes the hash value of the specified stream using the specified hash algorithm and signs the resulting hash value.
procedure SignData(XmlString: SecretText, DataInStream: InStream, HashAlgorithm: Enum "Hash Algorithm", SignatureOutStream: OutStream)
Parameters
| Name | Type | Description |
|---|---|---|
| XmlString | SecretText |
The XML string containing DSA key information. |
| DataInStream | InStream |
The input stream to hash and sign. |
| HashAlgorithm | Enum System.Security.Encryption."Hash Algorithm" |
The hash algorithm to use to create the hash value. |
| SignatureOutStream | OutStream |
The DSA signature stream for the specified data. |
VerifyData
Verifies that a digital signature is valid by calculating the hash value of the specified stream using the specified hash algorithm and comparing it to the provided signature.
procedure VerifyData(XmlString: SecretText, DataInStream: InStream, HashAlgorithm: Enum "Hash Algorithm", SignatureInStream: InStream): Boolean
Parameters
| Name | Type | Description |
|---|---|---|
| XmlString | SecretText |
The XML string containing DSA key information. |
| DataInStream | InStream |
The input stream of data that was signed. |
| HashAlgorithm | Enum System.Security.Encryption."Hash Algorithm" |
The name of the hash algorithm used to create the hash value of the data. |
| SignatureInStream | InStream |
The stream of signature data to be verified. |
Returns
| Type | Description |
|---|---|
| Boolean |
True if the signature is valid; otherwise, false. |