public enum OutputPrefixType extends Enum<OutputPrefixType> implements com.google.protobuf.Internal.EnumLite
Tink produces and accepts ciphertexts or signatures that consist
of a prefix and a payload. The payload and its format is determined
entirely by the primitive, but the prefix has to be one of the following
4 types:
- Legacy: prefix is 5 bytes, starts with \x00 and followed by a 4-byte
key id that is computed from the key material. In addition to
that, signature schemes and MACs will add a \x00 byte to the
end of the data being signed / MACed when operating on keys
with this OutputPrefixType.
- Crunchy: prefix is 5 bytes, starts with \x00 and followed by a 4-byte
key id that is generated randomly.
- Tink : prefix is 5 bytes, starts with \x01 and followed by 4-byte
key id that is generated randomly.
- Raw : prefix is 0 byte, i.e., empty.
Protobuf enum google.crypto.tink.OutputPrefixType| Enum Constant and Description |
|---|
CRUNCHY
CRUNCHY = 4; |
LEGACY
LEGACY = 2; |
RAW
RAW = 3; |
TINK
TINK = 1; |
UNKNOWN_PREFIX
UNKNOWN_PREFIX = 0; |
UNRECOGNIZED |
| Modifier and Type | Field and Description |
|---|---|
static int |
CRUNCHY_VALUE
CRUNCHY = 4; |
static int |
LEGACY_VALUE
LEGACY = 2; |
static int |
RAW_VALUE
RAW = 3; |
static int |
TINK_VALUE
TINK = 1; |
static int |
UNKNOWN_PREFIX_VALUE
UNKNOWN_PREFIX = 0; |
| Modifier and Type | Method and Description |
|---|---|
static OutputPrefixType |
forNumber(int value) |
int |
getNumber() |
static com.google.protobuf.Internal.EnumLiteMap<OutputPrefixType> |
internalGetValueMap() |
static com.google.protobuf.Internal.EnumVerifier |
internalGetVerifier() |
static OutputPrefixType |
valueOf(int value)
Deprecated.
Use
forNumber(int) instead. |
static OutputPrefixType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static OutputPrefixType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final OutputPrefixType UNKNOWN_PREFIX
UNKNOWN_PREFIX = 0;public static final OutputPrefixType TINK
TINK = 1;public static final OutputPrefixType LEGACY
LEGACY = 2;public static final OutputPrefixType RAW
RAW = 3;public static final OutputPrefixType CRUNCHY
CRUNCHY = 4;public static final OutputPrefixType UNRECOGNIZED
public static final int UNKNOWN_PREFIX_VALUE
UNKNOWN_PREFIX = 0;public static final int TINK_VALUE
TINK = 1;public static final int LEGACY_VALUE
LEGACY = 2;public static final int RAW_VALUE
RAW = 3;public static final int CRUNCHY_VALUE
CRUNCHY = 4;public static OutputPrefixType[] values()
for (OutputPrefixType c : OutputPrefixType.values()) System.out.println(c);
public static OutputPrefixType valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic final int getNumber()
getNumber in interface com.google.protobuf.Internal.EnumLite@Deprecated public static OutputPrefixType valueOf(int value)
forNumber(int) instead.value - The number of the enum to look for.public static OutputPrefixType forNumber(int value)
public static com.google.protobuf.Internal.EnumLiteMap<OutputPrefixType> internalGetValueMap()
public static com.google.protobuf.Internal.EnumVerifier internalGetVerifier()