io.spiffe.internal.AsymmetricKeyAlgorithm Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-spiffe-core Show documentation
Show all versions of java-spiffe-core Show documentation
Core functionality to fetch, process and validate X.509 and JWT SVIDs and Bundles from the Workload API.
package io.spiffe.internal;
public enum AsymmetricKeyAlgorithm {
RSA("RSA"),
EC("EC");
private final String value;
AsymmetricKeyAlgorithm(final String value) {
this.value = value;
}
public String value() {
return value;
}
public static AsymmetricKeyAlgorithm parse(String a) {
if ("RSA".equalsIgnoreCase(a)) {
return RSA;
} else if ("EC".equalsIgnoreCase(a)) {
return EC;
} else {
throw new IllegalArgumentException(String.format("Algorithm not supported: %s", a));
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy