All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.spiffe.internal.AsymmetricKeyAlgorithm Maven / Gradle / Ivy

Go to download

Core functionality to fetch, process and validate X.509 and JWT SVIDs and Bundles from the Workload API.

There is a newer version: 0.8.11
Show newest version
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