test_class.file: java_src/src/test/java/com/google/crypto/tink/signature/SigUtilTest.java
test_class.identifier: SigUtilTest
test_case.body: @Test
    public void testToHashType() throws Exception {
      assertEquals(Enums.HashType.SHA256, SigUtil.toHashType(HashType.SHA256));
      assertEquals(Enums.HashType.SHA384, SigUtil.toHashType(HashType.SHA384));
      assertEquals(Enums.HashType.SHA512, SigUtil.toHashType(HashType.SHA512));
      try {
        SigUtil.toHashType(HashType.UNKNOWN_HASH);
        fail("Invalid hash, should have thrown exception");
      } catch (GeneralSecurityException expected) {
      }
    }
test_case.class_method_signature: SigUtilTest.testToHashType()
test_case.full_signature: @Test public void testToHashType()
test_case.identifier: testToHashType
test_case.invocations: assertEquals toHashType assertEquals toHashType assertEquals toHashType toHashType fail
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testToHashType()
focal_class.declarator: INVALID_PARAMS = "Invalid ECDSA parameters"
focal_class.modifier: static final
focal_class.original_string: static final String INVALID_PARAMS = "Invalid ECDSA parameters";
focal_class.type: String
focal_class.var_name: INVALID_PARAMS
focal_class.file: java_src/src/main/java/com/google/crypto/tink/signature/SigUtil.java
focal_class.identifier: SigUtil
focal_class.class_method_signature: SigUtil.validateEcdsaParams(EcdsaParams params)
focal_class.full_signature: public static void validateEcdsaParams(EcdsaParams params)
focal_class.identifier: validateEcdsaParams
focal_class.modifiers: public static
focal_class.parameters: (EcdsaParams params)
focal_class.return: void
focal_class.signature: void validateEcdsaParams(EcdsaParams params)
focal_class.class_method_signature: SigUtil.validateRsaSsaPkcs1Params(RsaSsaPkcs1Params params)
focal_class.full_signature: public static void validateRsaSsaPkcs1Params(RsaSsaPkcs1Params params)
focal_class.identifier: validateRsaSsaPkcs1Params
focal_class.modifiers: public static
focal_class.parameters: (RsaSsaPkcs1Params params)
focal_class.return: void
focal_class.signature: void validateRsaSsaPkcs1Params(RsaSsaPkcs1Params params)
focal_class.class_method_signature: SigUtil.validateRsaSsaPssParams(RsaSsaPssParams params)
focal_class.full_signature: public static void validateRsaSsaPssParams(RsaSsaPssParams params)
focal_class.identifier: validateRsaSsaPssParams
focal_class.modifiers: public static
focal_class.parameters: (RsaSsaPssParams params)
focal_class.return: void
focal_class.signature: void validateRsaSsaPssParams(RsaSsaPssParams params)
focal_class.class_method_signature: SigUtil.toHashType(HashType hash)
focal_class.full_signature: public static Enums.HashType toHashType(HashType hash)
focal_class.identifier: toHashType
focal_class.modifiers: public static
focal_class.parameters: (HashType hash)
focal_class.return: Enums.HashType
focal_class.signature: Enums.HashType toHashType(HashType hash)
focal_class.class_method_signature: SigUtil.toCurveType(EllipticCurveType type)
focal_class.full_signature: public static EllipticCurves.CurveType toCurveType(EllipticCurveType type)
focal_class.identifier: toCurveType
focal_class.modifiers: public static
focal_class.parameters: (EllipticCurveType type)
focal_class.return: EllipticCurves.CurveType
focal_class.signature: EllipticCurves.CurveType toCurveType(EllipticCurveType type)
focal_class.class_method_signature: SigUtil.toEcdsaEncoding(EcdsaSignatureEncoding encoding)
focal_class.full_signature: public static EllipticCurves.EcdsaEncoding toEcdsaEncoding(EcdsaSignatureEncoding encoding)
focal_class.identifier: toEcdsaEncoding
focal_class.modifiers: public static
focal_class.parameters: (EcdsaSignatureEncoding encoding)
focal_class.return: EllipticCurves.EcdsaEncoding
focal_class.signature: EllipticCurves.EcdsaEncoding toEcdsaEncoding(EcdsaSignatureEncoding encoding)
focal_method.body: public static Enums.HashType toHashType(HashType hash) throws GeneralSecurityException {
      switch (hash) {
        case SHA256:
          return Enums.HashType.SHA256;
        case SHA384:
          return Enums.HashType.SHA384;
        case SHA512:
          return Enums.HashType.SHA512;
        default:
          break;
      }
      throw new GeneralSecurityException("unsupported hash type: " + hash.name());
    }
focal_method.class_method_signature: SigUtil.toHashType(HashType hash)
focal_method.full_signature: public static Enums.HashType toHashType(HashType hash)
focal_method.identifier: toHashType
focal_method.invocations: name
focal_method.modifiers: public static
focal_method.parameters: (HashType hash)
focal_method.return: Enums.HashType
focal_method.signature: Enums.HashType toHashType(HashType hash)