Key Type
The OpenPGP key being used.
Remarks
This type describes the current key. The key may be a public or secret key. The fields are used to identify or select the key.
Fields
EffectiveDate String |
The date when this key becomes valid. Prior to this it is not valid. The following is an example of a valid encoded date: 23-Jan-2000 15:00:00. | ||||||||||||
Encoded String |
The key. This field is used to assign a specific key. The UserId fields may also be used to specify a key. | ||||||||||||
EncodedB Byte[] |
The key. This field is used to assign a specific key. The UserId fields may also be used to specify a key. | ||||||||||||
ExpirationDate String |
The date the key expires. After this date the key will no longer be valid. The following is an example of a valid encoded date: 23-Jan-2001 15:00:00. | ||||||||||||
Fingerprint String |
The hex-encoded, 20-byte fingerprint of the key. This is in the form:
5E70662EA810E768391A2FE8F7B7D49C89C9D7B1 | ||||||||||||
Id String |
The hex-encoded, 4-byte key Id. It is same as last 4 bytes of Fingerprint. This is in the form:
89C9D7B1The KeyIdLength setting may be set to a value of 8 to return the last 8 bytes instead of the last 4 bytes. | ||||||||||||
OtherUserIds String |
If the specified key has alternate user Ids associated with it, this field returns a comma-separated list of the other user Ids. | ||||||||||||
Passphrase String |
The passphrase for the key's secret key (if any). This must be specified before operations requiring the secret key are attempted. The passphrase may be supplied in this field or through the KeyPassphrase event, which will fire when a passphrase is required. The passphrase is required when using the following methods in KeyMgr:
When using the OpenPGP component, or an email-based component, the following methods require a passphrase for the key:
| ||||||||||||
PublicKey String |
The public key of the key. The key is provided as ASCII armored data. | ||||||||||||
PublicKeyAlgorithm String |
A text description of the public key algorithm of the key. Possible values are "RSA", "DSA", and "RSA-Legacy". | ||||||||||||
PublicKeyLength Integer |
The length of the public key in bits. Common values are 512, 1024, and 2048. | ||||||||||||
Revoked Boolean |
Whether or not the key is revoked. | ||||||||||||
SecretKey String |
The secret key of the key (if available). The key is provided as ASCII armored data. | ||||||||||||
SecretKeyAvailable Boolean |
Whether or not a secret key is available for the selected key. | ||||||||||||
Usage String |
A text description of UsageFlags. The value will be of one or more of the following strings, separated by commas:
| ||||||||||||
UsageFlags Integer |
Flags that show the intended use for the key. The default value is 0x0F. The value of UsageFlags is a combination of the following flags:
Please refer to the Usage field for a text representation of UsageFlags. | ||||||||||||
UserId String |
The user Id of the key. When a key is loaded this field is populated with the user Id associated with the key. This field may be set to load a key from the Keyring. When this field is set the component will search the Keyring for a key associated with the UserId specified. When loading a key with multiple user Ids, this field will be populated with the UserId that was most recently added to the key. To discover all of the UserIds associated with a key query this field and OtherUserIds after loading the key. The UserId format is:
FirstName LastName (Comment) <Email>Not all values are required when selecting or generating a key, but at least FirstName or Email are required. When using this field to select a key you may also specify the key's Id, or any of its subkeys' Ids, instead of a user Id. The component will then search for a key with a matching Id. This is helpful in situations where you do not have the UserId but still need to load the key, such as within the OpenPGP component's RecipientInfo event. |
Constructors
[VB.NET] Public Key(ByVal KeyPath As String) [C#] public Key(string keyPath);
Reads the OpenPGP public key from the specified KeyPath . If multiple keys are present only the first one is used.
[VB.NET] Public Key(ByVal KeyData As String) [C#] public Key(byte[] keyData);
Reads the OpenPGP key from the specified KeyData . Both binary-formatted and ASCII-armored data are accepted.
[VB.NET] Public Key(ByVal KeyPath As String, ByVal UserId As String) [C#] public Key(string keyPath, string userId);
Searches the KeyPath for an OpenPGP key with a matching UserId . If UserId is set to "*" the first key will be used.
[VB.NET] Public Key(ByVal KeyPath As String, ByVal SecretKeyringFile As String, ByVal PublicKeyringFile As String, ByVal UserId As String) [C#] public Key(string keyPath, string secretKeyringFile, string publicKeyringFile, string userId);
Searches the KeyPath for the specified SecretKeyRingFile and PublicKeyringFile . If UserId is set to "*" the first key will be used.
[VB.NET] Public Key(ByVal KeyData As String, ByVal UserId As String) [C#] public Key(byte[] keyData, string userId);
Searches the KeyData for an OpenPGP key with a matching UserId . If UserId is set to "*" the first key will be used.