function Encrypt(const Data: TBytes; Padding: TScPaddingMode = pmPKCS2): TBytes;



Use the Encrypt method to encrypt data with the public key using the specified padding. This method returns an encrypted data.

The Padding parameter can be equal only to pmNone, pmPKCS2 or pmOAEP values. The maximum block size for PKCS2 padding mode should be 11 bytes less than a key size, and for OAEP padding mode - (2 + 2*HashLength) bytes less than a key size. The OAEP padding parameters can be specified by the OAEPParams property.


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


See also




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