DigestInfo digestInfo = new DigestInfo(new AlgorithmIdentifier(NISTObjectIdentifiers.id_sha512), hash); byte[] digestedHash = digestInfo.getEncoded(ASN1Encoding.DER);
private byte[] derEncode( byte[] hash) throws IOException { if (algId == null) { // For raw RSA, the DigestInfo must be prepared externally return hash; } DigestInfo dInfo = new DigestInfo(algId, hash); return dInfo.getEncoded(ASN1Encoding.DER); }
private byte[] derEncode( byte[] hash) throws IOException { if (algId == null) { // For raw RSA, the DigestInfo must be prepared externally return hash; } DigestInfo dInfo = new DigestInfo(algId, hash); return dInfo.getEncoded(ASN1Encoding.DER); }
private byte[] derEncode( byte[] hash) throws IOException { DigestInfo dInfo = new DigestInfo(algId, hash); return dInfo.getEncoded(ASN1Encoding.DER); } }
private byte[] derEncode( byte[] hash) throws IOException { DigestInfo dInfo = new DigestInfo(algId, hash); return dInfo.getEncoded(ASN1Encoding.DER); } }
byte[] hashToEncrypt = digestInfo.getEncoded();
byte[] digestInfo = new DigestInfo(algID, hash).getEncoded(); verifier.update(digestInfo, 0, digestInfo.length);
byte[] digestInfo = new DigestInfo(algID, hash).getEncoded(); signer.update(digestInfo, 0, digestInfo.length);
return rawVerifier.verify(digInfo.getEncoded(ASN1Encoding.DER), this.getSignature());
return rawVerifier.verify(digInfo.getEncoded(ASN1Encoding.DER), this.getSignature());