ISecure |
void Import( string fileName, string password, CancellationToken cancellationToken = default )
Exception | Condition |
---|---|
ArgumentNullException | fileName is null. -or- password is null. |
ArgumentException | fileName is a zero-length string, contains only white space, or contains one or more invalid characters. -or- fileName does not contain a private key. -or- fileName does not contain a certificate that could be used for signing. |
DirectoryNotFoundException | fileName is an invalid file path. |
FileNotFoundException | The specified file path could not be found. |
UnauthorizedAccessException | The user does not have access to read the specified file. |
IOException | An I/O error occurred. |
NotSupportedException | Importing keys is not supported by this cryptography context. |
OperationCanceledException | The operation was cancelled via the cancellation token. |