Skip to content

libsodium.PKI.PublicKey.Import

Andrew Lambert edited this page Jan 21, 2023 · 1 revision

Method Signatures

  Shared Function Import(ExportedKey As MemoryBlock, Optional Passwd As libsodium.Password) As libsodium.PKI.PublicKey
  Shared Function Import(ExportedKey As FolderItem, Optional Passwd As libsodium.Password) As libsodium.PKI.PublicKey

Parameters

Name Type Comment
ExportedKey MemoryBlock or FolderItem An exported PublicKey
Passwd Password Optional. The password used to encrypt the exported key

Return value

An instance of PublicKey containing the imported key, or Nil on error.

Remarks

Import a PublicKey that was exported using PublicKey.Export. Pass the Password if the key was encrypted when it was exported.

The type of key (encryption, signature, or unknown) is detected automatically. Query the Type property of the returned PublicKey instance to determine the type.

Clone this wiki locally