
com.google.crypto.tink.proto.EcdsaSignatureEncoding Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tink-android Show documentation
Show all versions of tink-android Show documentation
Tink is a small cryptographic library that provides a safe, simple, agile and fast way to accomplish some common cryptographic tasks.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: proto/ecdsa.proto
// Protobuf Java Version: 4.28.2
package com.google.crypto.tink.proto;
/**
* Protobuf enum {@code google.crypto.tink.EcdsaSignatureEncoding}
*/
public enum EcdsaSignatureEncoding
implements com.google.protobuf.Internal.EnumLite {
/**
* UNKNOWN_ENCODING = 0;
*/
UNKNOWN_ENCODING(0),
/**
*
* The signature's format is r || s, where r and s are zero-padded and have
* the same size in bytes as the order of the curve. For example, for NIST
* P-256 curve, r and s are zero-padded to 32 bytes.
*
*
* IEEE_P1363 = 1;
*/
IEEE_P1363(1),
/**
*
* The signature is encoded using ASN.1
* (https://tools.ietf.org/html/rfc5480#appendix-A):
* ECDSA-Sig-Value :: = SEQUENCE {
* r INTEGER,
* s INTEGER
* }
*
*
* DER = 2;
*/
DER(2),
UNRECOGNIZED(-1),
;
/**
* UNKNOWN_ENCODING = 0;
*/
public static final int UNKNOWN_ENCODING_VALUE = 0;
/**
*
* The signature's format is r || s, where r and s are zero-padded and have
* the same size in bytes as the order of the curve. For example, for NIST
* P-256 curve, r and s are zero-padded to 32 bytes.
*
*
* IEEE_P1363 = 1;
*/
public static final int IEEE_P1363_VALUE = 1;
/**
*
* The signature is encoded using ASN.1
* (https://tools.ietf.org/html/rfc5480#appendix-A):
* ECDSA-Sig-Value :: = SEQUENCE {
* r INTEGER,
* s INTEGER
* }
*
*
* DER = 2;
*/
public static final int DER_VALUE = 2;
@java.lang.Override
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static EcdsaSignatureEncoding valueOf(int value) {
return forNumber(value);
}
public static EcdsaSignatureEncoding forNumber(int value) {
switch (value) {
case 0: return UNKNOWN_ENCODING;
case 1: return IEEE_P1363;
case 2: return DER;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
EcdsaSignatureEncoding> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
@java.lang.Override
public EcdsaSignatureEncoding findValueByNumber(int number) {
return EcdsaSignatureEncoding.forNumber(number);
}
};
public static com.google.protobuf.Internal.EnumVerifier
internalGetVerifier() {
return EcdsaSignatureEncodingVerifier.INSTANCE;
}
private static final class EcdsaSignatureEncodingVerifier implements
com.google.protobuf.Internal.EnumVerifier {
static final com.google.protobuf.Internal.EnumVerifier INSTANCE = new EcdsaSignatureEncodingVerifier();
@java.lang.Override
public boolean isInRange(int number) {
return EcdsaSignatureEncoding.forNumber(number) != null;
}
};
private final int value;
private EcdsaSignatureEncoding(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.crypto.tink.EcdsaSignatureEncoding)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy