The InMemoryKeyStore type exposes the following members.

Constructors

  NameDescription
Public methodInMemoryKeyStore
Creates an empty In Memory KeyStore

Methods

  NameDescription
Public methodChangePrivateKeyPassword(Int64, String, String)
Changes private key password.

This method is equivalent to the GnuPG commands:
gpg --edit-key [userId]
Command>passwd
(Inherited from KeyStore.)
Public methodChangePrivateKeyPassword(String, String, String)
Changes private key password.
If more than one key pairs exist with the supplied userId, only the first one is affected.

This method is equivalent to the GnuPG commands:
gpg --edit-key [userId]
Command>passwd
(Inherited from KeyStore.)
Public methodCheckPassword
Checks if a password for a key store file is correct
(Inherited from KeyStore.)
Public methodContainsKey(Int64)
Checks is there a key with the specified Key ID in this Key Store
(Inherited from KeyStore.)
Public methodContainsKey(String)
Checks is there a key with the specified User Id in this Key Store
(Inherited from KeyStore.)
Public methodContainsPrivateKey(Int64)
Checks is there a private key with the specified Key ID in this Key Store
(Inherited from KeyStore.)
Public methodContainsPrivateKey(String)
Checks is there a private key with the specified User Id in this Key Store
(Inherited from KeyStore.)
Public methodContainsPublicKey(Int64)
Checks is there a public key with the specified Key ID in this Key Store
(Inherited from KeyStore.)
Public methodContainsPublicKey(String)
Checks is there a public key with the specified User Id in this Key Store
(Inherited from KeyStore.)
Public methodDeleteKeyPair(Int64)
Deletes the key pair (public and private key) from this key store that have the specified keyId.
(Inherited from KeyStore.)
Public methodDeleteKeyPair(String)
Deletes the first key pair (public and private key) from this key store that has the specified userId.
(Inherited from KeyStore.)
Public methodDeletePrivateKey(Int64)
Deletes a private key with the specified key Id from this KeyStore.
(Inherited from KeyStore.)
Public methodDeletePrivateKey(String)
Deletes the first private key from this key store that has the specified User Id.
(Inherited from KeyStore.)
Public methodDeletePublicKey(Int64)
Deletes the public key with the specified key Id from this key store.
(Inherited from KeyStore.)
Public methodDeletePublicKey(String)
Deletes the first public key pair from this key store that has the specified User Id.
(Inherited from KeyStore.)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodExportKeyRing(String, Int64)
Exports Key ring (both public and private key) located in this Key store in one file.
(Inherited from KeyStore.)
Public methodExportKeyRing(String, String)
Exports a key ring (the public and private key combined) located in this key store in one file.
(Inherited from KeyStore.)
Public methodExportKeyRing(String, Int64, Boolean)
Exports a key ring (the public and private key combined) located in this key store in one file.
(Inherited from KeyStore.)
Public methodExportKeyRing(String, String, Boolean)
Exports a key ring (the public and private key combined) located in this key store in one file.
(Inherited from KeyStore.)
Public methodExportPrivateKey(String, Int64, Boolean)
Exports private key from this OpenPGP key store into a file.
(Inherited from KeyStore.)
Public methodExportPrivateKey(String, String, Boolean)
Exports private key from this OpenPGP key store into a file.
(Inherited from KeyStore.)
Public methodExportPrivateKeyAsString(Int64)
Exports private key from this OpenPGP key store as a String in ASCII armored format.
(Inherited from KeyStore.)
Public methodExportPrivateKeyAsString(String)
Exports private key from this OpenPGP key store as a String in ASCII armored format.
(Inherited from KeyStore.)
Public methodExportPrivateKeyBytes(Int64)
Exports private key from this OpenPGP key store as a byte array.
(Inherited from KeyStore.)
Public methodExportPrivateKeyBytes(String)
Exports private key from this OpenPGP key store as a byte array
(Inherited from KeyStore.)
Public methodExportPrivateKeyStream(Int64)
Exports private key from this OpenPGP key store as an input stream for reading
(Inherited from KeyStore.)
Public methodExportPrivateKeyStream(String)
Exports private key from this OpenPGP key store as an input stream for reading
(Inherited from KeyStore.)
Public methodExportPublicKey(String, Int64, Boolean)
Exports public key from this OpenPGP key store into a file.
(Inherited from KeyStore.)
Public methodExportPublicKey(String, String, Boolean)
Exports public key from this OpenPGP key store, into file.
(Inherited from KeyStore.)
Public methodExportPublicKeyAsString(Int64)
Exports Public key from this OpenPGP key store as a String in ASCII armored format.
(Inherited from KeyStore.)
Public methodExportPublicKeyAsString(String)
Exports Public key from this OpenPGP key store as a String in ASCII armored format.
(Inherited from KeyStore.)
Public methodExportPublicKeyStream(Int64)
Exports public key from this OpenPGP key store as an input stream for reading
(Inherited from KeyStore.)
Public methodExportPublicKeyStream(String)
Exports public key from this OpenPGP key store as an input stream for reading
(Inherited from KeyStore.)
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGenerateKeyPair(Int32, String, String)
Generates OpenPGP Key pair with RSA encryption and predefined values for compression, hashing and cypher like the ones generated with PGP Desktop(tm) wizard.
(Inherited from KeyStore.)
Public methodGenerateKeyPair(Int32, String, KeyAlgorithm, String, array<CompressionAlgorithm>[]()[][], array<HashAlgorithm>[]()[][], array<CypherAlgorithm>[]()[][])
Generates OpenPGP Key pair (public and private key) with no expiration date.
The newly generated key is stored in this KeyStore instance.
(Inherited from KeyStore.)
Public methodGenerateKeyPair(Int32, String, String, String, String, String, String)
Generates OpenPGP Key pair (public and private key).
The newly generated key is stored in this KeyStore instance.
(Inherited from KeyStore.)
Public methodGenerateKeyPair(Int32, String, KeyAlgorithm, String, array<CompressionAlgorithm>[]()[][], array<HashAlgorithm>[]()[][], array<CypherAlgorithm>[]()[][], DateTime)
Generates PGP Key pair (public and private key) that expires on given date.
The newly generated key is stored in this KeyStore instance.
(Inherited from KeyStore.)
Public methodGenerateKeyPair(Int32, String, String, String, String, String, String, DateTime)
Generates PGP Key pair (public and private key).
The newly generated key is stored in this KeyStore instance.
(Inherited from KeyStore.)
Public methodGenerateKeyPair(Int32, String, String, String, String, String, String, Int64)
Generates PGP Key pair (public and private key).
The newly generated key is stored in this KeyStore instance.
(Inherited from KeyStore.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetKeyIdForKeyIdHex
Returns the real Key ID (of type long) corresponding to this Hexadecimal Key Id.
(Inherited from KeyStore.)
Public methodGetKeyIdForUserId
Returns the real Key ID (of type long) corresponding to this User Id.
(Inherited from KeyStore.)
Public methodGetKeys
Returns the key pairs stored in this OpenPGP key store.
(Inherited from KeyStore.)
Public methodGetPublicKeysData
Returns the public keys data contained in this KeyStore
(Inherited from KeyStore.)
Public methodGetPublicKeysWithUserId
Returns the public keys data with the specified User Id contained in this KeyStore
(Inherited from KeyStore.)
Public methodGetPublicKeyWithKeyId
Returns the public key data with the specified Key Id contained in this IKeyStore
(Inherited from KeyStore.)
Public methodGetSecretKeysData
Returns the secret keys data contained in this KeyStore
(Inherited from KeyStore.)
Public methodGetSecretKeysWithUserId
Returns the secret keys data with the specified User Id contained in this IKeyStore
(Inherited from KeyStore.)
Public methodGetSecretKeyWithKeyId
Returns the secret key data with the specified Key Id contained in this IKeyStore
(Inherited from KeyStore.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodImportKeyRing(FileInfo)
Imports OpenPGP key ring in this key store.
(Inherited from KeyStore.)
Public methodImportKeyRing(String)
Imports OpenPGP key ring in this KeyStore instance.
(Inherited from KeyStore.)
Public methodImportPrivateKey(String)
Imports and OpenPGP private key into a custom OpenPGP key store.
(Inherited from KeyStore.)
Public methodImportPrivateKey(String, String)
Imports and OpenPGP private key into a custom OpenPGP key store.
(Inherited from KeyStore.)
Public methodImportPublicKey
Imports Public key into a custom OpenPGP key store. If the key store does not exist, it is created.
(Inherited from KeyStore.)
Public methodisTrusted(Int64)
Checks is a public key trusted in this Key store.
(Inherited from KeyStore.)
Public methodisTrusted(String)
Checks is a public key trusted in this Key store.
(Inherited from KeyStore.)
Public methodLoadFromStream
Loads the keystore data from a stream, where it has been stored previously
(Inherited from KeyStore.)
Protected methodloadKeyFile
Helper method for importing external public or private keys
(Inherited from KeyStore.)
Protected methodLoadPublicKeysData
Loads public keys data into this IKeyStore from a byte array obtained from an OpenPGP public key ring
(Inherited from KeyStore.)
Protected methodLoadSecretKeysData
Loads secret keys data into this IKeyStore from a byte array obtained from an OpenPGP secret key ring
(Inherited from KeyStore.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodSave
Saves the Key Store to disk.
(Inherited from KeyStore.)
Public methodSaveToStream
Saves the keystore data to a stream
(Inherited from KeyStore.)
Public methodSetTrust(Int64, TrustLevel)
Sets an internal trust value for a public key, valid only in this KeyStore instance
(Inherited from KeyStore.)
Public methodSetTrust(String, TrustLevel)
Sets an internal trust value for a public key, valid only in this KeyStore instance
(Inherited from KeyStore.)
Public methodSignPublicKey(Int64, Int64, String)
Signs a public key with a specified private key.
(Inherited from KeyStore.)
Public methodSignPublicKey(String, String, String)
Signs a public key with a private key.
(Inherited from KeyStore.)
Public methodSignPublicKeyAsTrustedIntroducer(Int64, Int64, String)
Signs a public key as trusted introducer
(Inherited from KeyStore.)
Public methodSignPublicKeyAsTrustedIntroducer(String, Int64, String)
Signs a public key as trusted introducer
(Inherited from KeyStore.)
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)

Fields

  NameDescription
Protected fieldkeys
List of keys contained in this KeyStore. Pairs of (keyId, KeyPairInformation)
(Inherited from KeyStore.)

Properties

  NameDescription
Public propertyAutoSave
Property that indicates should the KeyStore backing file be auto saved after each operation that changes its state.
(Inherited from KeyStore.)
Public propertyBackupOnSave
Property that indicates should the old KeyStore backing file be copied automatically in a file with extension .bak right before the save operation
(Inherited from KeyStore.)
Public propertyFileName
File name where this KeyStore object is stored.
(Inherited from KeyStore.)
Public propertyHexKeyIds
Returns array of Hexadecimal string representation of the key Id's for the keys contained in this KeyStore instance.

This hexadecimal value is composed of the lower four bytes of the real key Id (8 bytes) and is the same as the one displayed by PGP (r) and GnuPG.
(Inherited from KeyStore.)
Public propertyIsInMemory
Indicates is this KeyStore instance in-memory (True) or file based (False)
(Inherited from KeyStore.)
Public propertyPartialMatchUserIds
Sets/Gets is searching keys performed on whole User Id or only on part of it.
(Inherited from KeyStore.)
Public propertyPassword
Password of this KeyStore
(Inherited from KeyStore.)
Public propertyUserIds
Returns array of Strings representing all user Id's contained in this KeyStore instance.
(Inherited from KeyStore.)

See Also