Package org.pgpainless.algorithm
Enum KeyFlag
- java.lang.Object
-
- java.lang.Enum<KeyFlag>
-
- org.pgpainless.algorithm.KeyFlag
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AUTHENTICATION
CERTIFY_OTHER
ENCRYPT_COMMS
ENCRYPT_STORAGE
SHARED
SIGN_DATA
SPLIT
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.util.List<KeyFlag>
fromBitmask(int bitmask)
int
getFlag()
static boolean
hasKeyFlag(int mask, KeyFlag flag)
static int
toBitmask(KeyFlag... flags)
static KeyFlag
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static KeyFlag[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CERTIFY_OTHER
public static final KeyFlag CERTIFY_OTHER
-
SIGN_DATA
public static final KeyFlag SIGN_DATA
-
ENCRYPT_COMMS
public static final KeyFlag ENCRYPT_COMMS
-
ENCRYPT_STORAGE
public static final KeyFlag ENCRYPT_STORAGE
-
SPLIT
public static final KeyFlag SPLIT
-
AUTHENTICATION
public static final KeyFlag AUTHENTICATION
-
SHARED
public static final KeyFlag SHARED
-
-
Method Detail
-
values
public static KeyFlag[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (KeyFlag c : KeyFlag.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static KeyFlag valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getFlag
public int getFlag()
-
fromBitmask
public static java.util.List<KeyFlag> fromBitmask(int bitmask)
-
toBitmask
public static int toBitmask(KeyFlag... flags)
-
hasKeyFlag
public static boolean hasKeyFlag(int mask, KeyFlag flag)
-
-