MCPcopy Create free account
hub / github.com/DeNA/PacketProxy / algString

Method algString

src/main/java/core/org/xbill/DNS/DNSSEC.java:660–684  ·  view source on GitHub ↗

Convert an algorithm number to the corresponding JCA string. @param alg The algorithm number. @throws UnsupportedAlgorithmException The algorithm is unknown.

(int alg)

Source from the content-addressed store, hash-verified

658 * @throws UnsupportedAlgorithmException The algorithm is unknown.
659 */
660public static String
661algString(int alg) throws UnsupportedAlgorithmException {
662 switch (alg) {
663 case Algorithm.RSAMD5:
664 return "MD5withRSA";
665 case Algorithm.DSA:
666 case Algorithm.DSA_NSEC3_SHA1:
667 return "SHA1withDSA";
668 case Algorithm.RSASHA1:
669 case Algorithm.RSA_NSEC3_SHA1:
670 return "SHA1withRSA";
671 case Algorithm.RSASHA256:
672 return "SHA256withRSA";
673 case Algorithm.RSASHA512:
674 return "SHA512withRSA";
675 case Algorithm.ECC_GOST:
676 return "GOST3411withECGOST3410";
677 case Algorithm.ECDSAP256SHA256:
678 return "SHA256withECDSA";
679 case Algorithm.ECDSAP384SHA384:
680 return "SHA384withECDSA";
681 default:
682 throw new UnsupportedAlgorithmException(alg);
683 }
684}
685
686private static final int ASN1_SEQ = 0x30;
687private static final int ASN1_INT = 0x2;

Callers 2

verifyMethod · 0.95
signMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected