procedure ImportFrom(const FileName: string; const Password: string; out Comment: string); overload;
procedure ImportFrom(const FileName: string; const Password: string = ''); overload;
procedure ImportFrom(Stream: TStream; const Password: string; out Comment: string); overload;
procedure ImportFrom(Stream: TStream; const Password: string = ''); overload;
Description
Imports the key from the specified file or stream.
The key can be stored in different formats. Format is determined automatically when loading the key. Some formats lets store the key in the encrypted form. If the key was encrypted, it is required to specify the password for decryption.
Parameters:
• | FileName - determined the file name from which the key will be imported. If the file does not exists, the exception will be raised. |
• | Stream - a pointer to the stream that holds data for importing the key. |
• | Password - the password that is used for data decryption. |
• | Comment - additional information specified by the user when saving the key is returned by this parameter. |
Note: If the key is loaded successfully, the Algorithm, BitCount, IsPrivate becomes assigned, and the Ready property is set to True.
See also