Imports OpenPGP key ring in this key store.
Namespace: DidiSoft.PgpAssembly: DidiSoft.Pgp (in DidiSoft.Pgp.dll) Version: 1.7.3.35547
Syntax
| C# |
|---|
public KeyPairInformation[] ImportKeyRing( FileInfo keyRingFile ) |
| Visual Basic |
|---|
Public Function ImportKeyRing ( _ keyRingFile As FileInfo _ ) As KeyPairInformation() |
| Visual C++ |
|---|
public: array<KeyPairInformation^>^ ImportKeyRing( FileInfo^ keyRingFile ) |
Parameters
- keyRingFile
- Type: System.IO..::..FileInfo
Key Ring file to be imported
Return Value
[Missing <returns> documentation for "M:DidiSoft.Pgp.KeyStore.ImportKeyRing(System.IO.FileInfo)"]
Remarks
The key ring may contain public, private or both type of keys.
Examples
using System; using System.IO; using DidiSoft.Pgp; public class ImportRing { public static void Demo() { KeyStore keyStore = new KeyStore(@"C:\key.store", "changeit"); FileInfo keyRing = new FileInfo(@"C:\keyring.asc"); keyStore.ImportKeyRing(keyRing); } }
Imports System Imports System.IO Imports DidiSoft.Pgp Public Class ImportRing Public Shared Sub Demo() Dim keyStore As New KeyStore("C:\key.store", "changeit") Dim keyRing As New FileInfo("C:\keyring.asc") keyStore.ImportKeyRing(keyRing) End Sub End Class
Exceptions
| Exception | Condition |
|---|---|
| System.IO..::..IOException | I/O error |