function Sign(const Data: TBytes; HashAlg: TScHashAlgorithm = haSHA1; Padding: TScPaddingMode = pmPKCS1): TBytes;

 

Description

Use the Sign method, to sign necessary data by using the private key. The function returns the signature of the specified data.

The Padding parameter can be equal only to pmPKCS1 or pmPSS values. The PSS padding parameters can be specified by the PSSParams property.

 

Use this signature to verify the data integrity. If the data substitution is possible when the data is transferred, it is required to transfer the data signature along with the data itself. In this case the receiver must have the public constituent of the key, that is used to verify the signature.

To verify the signature use the VerifySign method.

 

Note: If the Ready property is False, the key will be automatically loaded.

 

Note: If the key is not private (IsPrivate = False), the exception will be raised.

 

See also

PSSParams

VerifySign

 

SecureBridge Components, Copyright © 2007-2021 Devart. All Rights Reserved. Provide Feedback Visit Forum Request Support