コード例 #1
0
 public String getSigAlgName() {
   if (sigAlgId.equals(ID_DSA_WITH_SHA1)) {
     return "SHA1withDSA";
   }
   if (sigAlgId.equals(ID_RSA_WITH_MD2)) {
     return "MD2withRSA";
   }
   if (sigAlgId.equals(ID_RSA_WITH_MD5)) {
     return "MD5withRSA";
   }
   if (sigAlgId.equals(ID_RSA_WITH_SHA1)) {
     return "SHA1withRSA";
   }
   return "unknown";
 }
コード例 #2
0
 public void verify(PublicKey key, String provider)
     throws CertificateException, NoSuchAlgorithmException, InvalidKeyException,
         NoSuchProviderException, SignatureException {
   Signature sig = Signature.getInstance(sigAlgId.toString(), provider);
   doVerify(sig, key);
 }
コード例 #3
0
 public String getSigAlgOID() {
   return sigAlgId.toString();
 }