Examples of reset()


Examples of org.bouncycastle.crypto.Digest.reset()

                return stream.getDigest();
            }

            public void reset()
            {
                dig.reset();
            }
        };
    }

    private class DigestOutputStream
View Full Code Here

Examples of org.bouncycastle.crypto.Mac.reset()

        }

        //
        // non-word aligned data - zero IV - CBC padding
        //
        mac.reset();

        mac.update(input1, 0, input1.length);

        out = new byte[4];
View Full Code Here

Examples of org.bouncycastle.crypto.digests.MD5Digest.reset()

   * @throws UnknownHostException
   */
  public UUID getMachineId() throws UnsupportedEncodingException,
      SocketException, UnknownHostException {
    final MD5Digest md5 = new MD5Digest();
    md5.reset();
    if (useNetwork) {
      updateWithNetworkData(md5);
    }
    if (useHostName) {
      updateWithHostName(md5);
View Full Code Here

Examples of org.bouncycastle.crypto.digests.SHA512Digest.reset()

     *
     * @return the digest as a byte array.
     */
    public byte[] calculatePublicKeyRingDigest() {
        final SHA512Digest dig = new SHA512Digest();
        dig.reset();
        dig.update(publicKeyRing, 0, publicKeyRing.length);
        final byte[] digest = new byte[dig.getDigestSize()];
        dig.doFinal(digest, 0);
        return digest;
    }
View Full Code Here

Examples of org.bouncycastle.crypto.macs.CBCBlockCipherMac.reset()

        }

        //
        // non-word aligned data - zero IV - CBC padding
        //
        mac.reset();

        mac.update(input1, 0, input1.length);

        out = new byte[4];
View Full Code Here

Examples of org.bouncycastle.crypto.macs.HMac.reset()

            m = Hex.decode(messages[vector].substring(2));
        }
        hmac.init(new KeyParameter(Hex.decode(keys[vector])));
        hmac.update(m, 0, m.length);
        hmac.doFinal(resBuf, 0);
        hmac.reset();
        hmac.update(m, 0, m.length);
        hmac.doFinal(resBuf, 0);

        if (!arraysEqual(resBuf, Hex.decode(digests[vector])))
        {
View Full Code Here

Examples of org.bouncycastle.x509.X509V2AttributeCertificateGenerator.reset()

        X509Certificate     clientCert = createClientCert(pubKey, caPrivKey, caPubKey);

        // Instantiate a new AC generator
        X509V2AttributeCertificateGenerator acGen = new X509V2AttributeCertificateGenerator();

        acGen.reset();

        //
        // Holder: here we use the IssuerSerial form
        //
        acGen.setHolder(new AttributeCertificateHolder(clientCert));
View Full Code Here

Examples of org.bouncycastle.x509.X509V3CertificateGenerator.reset()

        PrivateKey _issPriv = _issKP.getPrivate();
        PublicKey _issPub = _issKP.getPublic();

        X509V3CertificateGenerator _v3CertGen = new X509V3CertificateGenerator();

        _v3CertGen.reset();
        _v3CertGen.setSerialNumber(allocateSerialNumber());
        _v3CertGen.setIssuerDN(new X509Name(_issDN));
        _v3CertGen.setNotBefore(new Date(System.currentTimeMillis()));
        _v3CertGen.setNotAfter(new Date(System.currentTimeMillis()
                + (1000L * 60 * 60 * 24 * 100)));
 
View Full Code Here

Examples of org.bson.LazyBSONCallback.reset()

    public int compare(final byte[] b1, final int s1, final int l1, final byte[] b2, final int s2, final int l2) {
        LazyBSONCallback cb = new LazyBSONCallback();
        DECODER.decode(b1, cb);
        BSONObject a = (BSONObject) cb.get();

        cb.reset();
        DECODER.decode(b2, cb);
        BSONObject b = (BSONObject) cb.get();
        return compare(a, b);
    }
View Full Code Here

Examples of org.bson.io.PoolOutputBuffer.reset()

                    return null;
                }
            });
            return nextMessage;
        } finally {
            buffer.reset();
        }
    }

    private CommandResult receiveWriteCommandMessage(final DBPort port) {
        return db.getConnector().doOperation(getDB(), port, new DBPort.Operation<CommandResult>() {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.