public OtherCertID( AlgorithmIdentifier algId, byte[] digest, IssuerSerial issuerSerial) { this.otherCertHash = new DigestInfo(algId, digest); this.issuerSerial = issuerSerial; }
public OtherCertID( AlgorithmIdentifier algId, byte[] digest, IssuerSerial issuerSerial) { this.otherCertHash = new DigestInfo(algId, digest); this.issuerSerial = issuerSerial; }
public OtherCertID( AlgorithmIdentifier algId, byte[] digest) { this.otherCertHash = new DigestInfo(algId, digest); }
public OtherCertID( AlgorithmIdentifier algId, byte[] digest) { this.otherCertHash = new DigestInfo(algId, digest); }
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 { 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); }
public static DigestInfo getInstance( Object obj) { if (obj instanceof DigestInfo) { return (DigestInfo)obj; } else if (obj != null) { return new DigestInfo(ASN1Sequence.getInstance(obj)); } return null; }
private byte[] derEncode( byte[] hash) throws IOException { DigestInfo dInfo = new DigestInfo(algId, hash); return dInfo.getEncoded(ASN1Encoding.DER); } }
public static DigestInfo getInstance( Object obj) { if (obj instanceof DigestInfo) { return (DigestInfo)obj; } else if (obj != null) { return new DigestInfo(ASN1Sequence.getInstance(obj)); } return null; }
public MessageImprint build(byte[] message) throws DVCSException { try { OutputStream dOut = digestCalculator.getOutputStream(); dOut.write(message); dOut.close(); return new MessageImprint(new DigestInfo(digestCalculator.getAlgorithmIdentifier(), digestCalculator.getDigest())); } catch (Exception e) { throw new DVCSException("unable to build MessageImprint: " + e.getMessage(), e); } } }
public MessageImprint build(byte[] message) throws DVCSException { try { OutputStream dOut = digestCalculator.getOutputStream(); dOut.write(message); dOut.close(); return new MessageImprint(new DigestInfo(digestCalculator.getAlgorithmIdentifier(), digestCalculator.getDigest())); } catch (Exception e) { throw new DVCSException("unable to build MessageImprint: " + e.getMessage(), e); } } }
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);
public MacData build(char[] password, byte[] data) throws PKCSException { MacCalculator macCalculator; try { macCalculator = builder.build(password); OutputStream out = macCalculator.getOutputStream(); out.write(data); out.close(); } catch (Exception e) { throw new PKCSException("unable to process data: " + e.getMessage(), e); } AlgorithmIdentifier algId = macCalculator.getAlgorithmIdentifier(); DigestInfo dInfo = new DigestInfo(builder.getDigestAlgorithmIdentifier(), macCalculator.getMac()); PKCS12PBEParams params = PKCS12PBEParams.getInstance(algId.getParameters()); return new MacData(dInfo, params.getIV(), params.getIterations().intValue()); } }
public MacData build(char[] password, byte[] data) throws PKCSException { MacCalculator macCalculator; try { macCalculator = builder.build(password); OutputStream out = macCalculator.getOutputStream(); out.write(data); out.close(); } catch (Exception e) { throw new PKCSException("unable to process data: " + e.getMessage(), e); } AlgorithmIdentifier algId = macCalculator.getAlgorithmIdentifier(); DigestInfo dInfo = new DigestInfo(builder.getDigestAlgorithmIdentifier(), macCalculator.getMac()); PKCS12PBEParams params = PKCS12PBEParams.getInstance(algId.getParameters()); return new MacData(dInfo, params.getIV(), params.getIterations().intValue()); } }
DigestInfo dInfo = new DigestInfo(algId, res);
DigestInfo dInfo = new DigestInfo(algId, res);
final DigestInfo otherHashAlgAndValue = new DigestInfo(hashid, hashed);
DigestInfo digInfo = new DigestInfo(new AlgorithmIdentifier(digestAlgorithm.getAlgorithm(), DERNull.INSTANCE), resultDigest);