
io.opencannabis.schema.crypto.primitives.KeyingScheme Maven / Gradle / Ivy
/*
* Copyright 2018, Momentum Ideas, Co. All rights reserved.
*
* Source and object computer code contained herein is the private intellectual
* property of Momentum Ideas Co., a Delaware Corporation. Use of this
* code in source form requires permission in writing before use or the
* assembly, distribution, or publishing of derivative works, for commercial
* purposes or any other purpose, from a duly authorized officer of Momentum
* Ideas Co.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: crypto/primitives/Keys.proto
package io.opencannabis.schema.crypto.primitives;
/**
*
* Enumerates PKI/asymmetric keying schemes supported by the system. RSA, ECC and DSA keying are usually used for TLS,
* and in particular HTTPS (with DSA being in the far minority). EdDSA keying is used for distributed ledger operations.
*
*
* Protobuf enum {@code opencannabis.crypto.KeyingScheme}
*/
public enum KeyingScheme
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* RSA keying.
*
*
* RSA = 0;
*/
RSA(0),
/**
*
* ECC (curve-based) keying.
*
*
* ECC = 1;
*/
ECC(1),
/**
*
* DSA keying.
*
*
* DSA = 2;
*/
DSA(2),
/**
*
* ED-DSA keying.
*
*
* EdDSA = 3;
*/
EdDSA(3),
UNRECOGNIZED(-1),
;
/**
*
* RSA keying.
*
*
* RSA = 0;
*/
public static final int RSA_VALUE = 0;
/**
*
* ECC (curve-based) keying.
*
*
* ECC = 1;
*/
public static final int ECC_VALUE = 1;
/**
*
* DSA keying.
*
*
* DSA = 2;
*/
public static final int DSA_VALUE = 2;
/**
*
* ED-DSA keying.
*
*
* EdDSA = 3;
*/
public static final int EdDSA_VALUE = 3;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static KeyingScheme valueOf(int value) {
return forNumber(value);
}
public static KeyingScheme forNumber(int value) {
switch (value) {
case 0: return RSA;
case 1: return ECC;
case 2: return DSA;
case 3: return EdDSA;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
KeyingScheme> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public KeyingScheme findValueByNumber(int number) {
return KeyingScheme.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return io.opencannabis.schema.crypto.primitives.Keys.getDescriptor().getEnumTypes().get(6);
}
private static final KeyingScheme[] VALUES = values();
public static KeyingScheme valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private KeyingScheme(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:opencannabis.crypto.KeyingScheme)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy