IP*Works! Encrypt V9 - Online Help
IP*Works! Encrypt V9
Questions / Feedback?

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:

89C9D7B1
The 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:

  • AddUserId
  • SignUserId
  • ChangeExpirationDate
  • ChangePassphrase

When using the OpenPGP bean, or an email-based bean, the following methods require a passphrase for the key:

  • Decrypt
  • Sign
  • SignAndEncrypt

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
int

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:

  • Certifying Other Certificates
  • Signing Emails and Files
  • Encrypting Emails and Files
  • Split Key
  • Authenticate Against Servers
  • Group Key

UsageFlags
int

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:

0x01This key may be used to certify other keys.
0x02This key may be used to sign data.
0x0CThis key may be used to encrypt communications and encrypt storage.
0x10The private component of this key may have been split by a secret-sharing mechanism.
0x20This key may be used for authentication.
0x80The private component of this key may be in the possession of more than one person.

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 bean 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 bean 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 bean's RecipientInfo event.

Constructors

public Key(String keyPath);

Reads the OpenPGP public key from the specified KeyPath . If multiple keys are present only the first one is used.

public Key(byte [] keyData);

Reads the OpenPGP key from the specified KeyData . Both binary-formatted and ASCII-armored data are accepted.

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.

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.

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.

 
 
Copyright (c) 2017 /n software inc. - All rights reserved.
Build 9.0.6240.0