class SignatureAlgorithm {

    @JsonCreator
    public static SignatureAlgorithm create(String jcaName){
        switch (jcaName){
            case "SHA256withECDSA":
                return ES256;
            case "SHA384withECDSA":
                return ES384;
            case "SHA512withECDSA":
                return ES512;
            case "SHA1withRSA":
                return RS1;
            case "SHA256withRSA":
                return RS256;
            case "SHA384withRSA":
                return RS384;
            case "SHA512withRSA":
                return RS512;
            default:
                throw new IllegalArgumentException(String.format("jcaName %s is not supported.", jcaName));
        }
    }

    private  SignatureAlgorithm(String jcaName, MessageDigestAlgorithm messageDigestAlgorithm);

}