public static EllipticCurves.CurveType toCurveType(EllipticCurveType type)
      throws GeneralSecurityException {
    switch (type) {
      case NIST_P256:
        return EllipticCurves.CurveType.NIST_P256;
      case NIST_P384:
        return EllipticCurves.CurveType.NIST_P384;
      case NIST_P521:
        return EllipticCurves.CurveType.NIST_P521;
      default:
        throw new GeneralSecurityException("unknown curve type: " + type.name());
    }
  }
Converts protobuf enum {@code EllipticCurveType} to raw Java enum {code CurveType}.
java_src/src/main/java/com/google/crypto/tink/signature/internal/SigUtil.java