public static EllipticCurves.EcdsaEncoding toEcdsaEncoding(EcdsaSignatureEncoding encoding)
      throws GeneralSecurityException {
    switch (encoding) {
      case IEEE_P1363:
        return EllipticCurves.EcdsaEncoding.IEEE_P1363;
      case DER:
        return EllipticCurves.EcdsaEncoding.DER;
      default:
        throw new GeneralSecurityException("unknown ECDSA encoding: " + encoding.name());
    }
  }
Converts protobuf enum {@code EcdsaSignatureEncoding} to raw Java enum {code
EllipticCurves.EcdsaEncoding}.
java_src/src/main/java/com/google/crypto/tink/signature/internal/SigUtil.java