Top Description Fields Constructors Methods
org.bouncycastle.bcpg.sig

public Class KeyFlags

extends SignatureSubpacket
Class Inheritance
Imports
org.bouncycastle.bcpg.SignatureSubpacket, .SignatureSubpacketTags

Signature Subpacket encoding the capabilities / intended uses of a key.
See Also
RFC4880 - Key Flags, RFC9580 - Key Flags

Field Summary

Modifier and TypeField and Description
public static final int
AUTHENTICATION

This key may be used for authentication.

public static final int
CERTIFY_OTHER

This key may be used to make User ID certifications (signature type IDs 0x10-0x13) or direct key signatures (signature type ID 0x1F) over other peoples keys.

public static final int
ENCRYPT_COMMS

This key may be used to encrypt communications.

public static final int
ENCRYPT_STORAGE

This key may be used to encrypt storage.

public static final int
SHARED

The private component of this key may be in the possession of more than one person.

public static final int
SIGN_DATA

This key may be used to sign data.

public static final int
SPLIT

The private component of this key may have been split by a secret-sharing mechanism.

Inherited from org.bouncycastle.bcpg.SignatureSubpacket:
data

Constructor Summary

AccessConstructor and Description
public
KeyFlags(boolean critical, boolean isLongLength, byte[] data)

public
KeyFlags(boolean critical, int flags)

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

flag values.
getFlags
()

Return the flag values contained in the first 4 octets (note: at the moment the standard only uses the first one).

private static byte[]
Inherited from org.bouncycastle.bcpg.SignatureSubpacket:
encodeequalsgetDatagetTypehashCodeisCriticalisLongLength

Field Detail

AUTHENTICATIONback to summary
public static final int AUTHENTICATION

This key may be used for authentication.

CERTIFY_OTHERback to summary
public static final int CERTIFY_OTHER

This key may be used to make User ID certifications (signature type IDs 0x10-0x13) or direct key signatures (signature type ID 0x1F) over other peoples keys.

ENCRYPT_COMMSback to summary
public static final int ENCRYPT_COMMS

This key may be used to encrypt communications.

ENCRYPT_STORAGEback to summary
public static final int ENCRYPT_STORAGE

This key may be used to encrypt storage.

SHAREDback to summary
public static final int SHARED

The private component of this key may be in the possession of more than one person.

SIGN_DATAback to summary
public static final int SIGN_DATA

This key may be used to sign data.

SPLITback to summary
public static final int SPLIT

The private component of this key may have been split by a secret-sharing mechanism.

Constructor Detail

KeyFlagsback to summary
public KeyFlags(boolean critical, boolean isLongLength, byte[] data)
KeyFlagsback to summary
public KeyFlags(boolean critical, int flags)

Method Detail

getFlagsback to summary
public int getFlags()

Return the flag values contained in the first 4 octets (note: at the moment the standard only uses the first one).

Returns:int

flag values.

intToByteArrayback to summary
private static byte[] intToByteArray(int v)