public enum OutputPrefixType extends Enum<OutputPrefixType> implements com.google.protobuf.ProtocolMessageEnum
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 5 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. - WITH_ID_REQUIREMENT: prefix size may vary i.e., empty, 1 byte etc, but the key is always required to have an ID. This is used for example for pre-hashing, where the ID is used to sync with a remote pre-hash signer, but no prefix is added to the signature.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 |
WITH_ID_REQUIREMENT
WITH_ID_REQUIREMENT = 5; |
| 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; |
static int |
WITH_ID_REQUIREMENT_VALUE
WITH_ID_REQUIREMENT = 5; |
| Modifier and Type | Method and Description |
|---|---|
static OutputPrefixType |
forNumber(int value) |
static com.google.protobuf.Descriptors.EnumDescriptor |
getDescriptor() |
com.google.protobuf.Descriptors.EnumDescriptor |
getDescriptorForType() |
int |
getNumber() |
com.google.protobuf.Descriptors.EnumValueDescriptor |
getValueDescriptor() |
static com.google.protobuf.Internal.EnumLiteMap<OutputPrefixType> |
internalGetValueMap() |
static OutputPrefixType |
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) |
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 WITH_ID_REQUIREMENT
WITH_ID_REQUIREMENT = 5;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 final int WITH_ID_REQUIREMENT_VALUE
WITH_ID_REQUIREMENT = 5;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.EnumLitegetNumber in interface com.google.protobuf.ProtocolMessageEnum@Deprecated public static OutputPrefixType valueOf(int value)
forNumber(int) instead.value - The numeric wire value of the corresponding enum entry.public static OutputPrefixType forNumber(int value)
value - The numeric wire value of the corresponding enum entry.public static com.google.protobuf.Internal.EnumLiteMap<OutputPrefixType> internalGetValueMap()
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()
getValueDescriptor in interface com.google.protobuf.ProtocolMessageEnumpublic final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.ProtocolMessageEnumpublic static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
public static OutputPrefixType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)