Examples of digest()


Examples of java.security.MessageDigest.digest()

  public static String MD5(byte[] source) {
    try {
      MessageDigest md = MessageDigest.getInstance("MD5");
      md.update(source);
      return hexStringFromBytes(md.digest());
    } catch (Exception e) {
      e.printStackTrace();
      return "";
    }
  }
View Full Code Here

Examples of java.security.MessageDigest.digest()

  public static byte[] MD5bytes(String str) {
    try {
      MessageDigest md = MessageDigest.getInstance("MD5");
      md.update(str.getBytes());
      return md.digest();
    } catch (Exception e) {
      e.printStackTrace();
      return null;
    }
  }
View Full Code Here

Examples of jcifs.util.HMACT64.digest()

                    MD4 md4 = new MD4();
                    md4.update(responseKeyNT);
                    HMACT64 hmac = new HMACT64(md4.digest());
                    hmac.update(sessionNonce);
                    byte[] userSessionKey = hmac.digest(); // NTLM2 session key

                    if ((getFlags() & NTLMSSP_NEGOTIATE_KEY_EXCH) != 0) {
                        masterKey = new byte[16];
                        RANDOM.nextBytes(masterKey);
View Full Code Here

Examples of jcifs.util.MD4.digest()

                    System.arraycopy(type2.getChallenge(), 0, sessionNonce, 0, 8);
                    System.arraycopy(clientChallenge, 0, sessionNonce, 8, 8);

                    MD4 md4 = new MD4();
                    md4.update(responseKeyNT);
                    HMACT64 hmac = new HMACT64(md4.digest());
                    hmac.update(sessionNonce);
                    byte[] userSessionKey = hmac.digest(); // NTLM2 session key

                    if ((getFlags() & NTLMSSP_NEGOTIATE_KEY_EXCH) != 0) {
                        masterKey = new byte[16];
View Full Code Here

Examples of net.schmizz.sshj.transport.digest.Digest.digest()

                .putRawBytes(sessionID);
        final int pos = hashInput.available() - sessionID.length - 1; // Position of <placeholder>

        hashInput.array()[pos] = 'A';
        hash.update(hashInput.array(), 0, hashInput.available());
        final byte[] initialIV_C2S = hash.digest();

        hashInput.array()[pos] = 'B';
        hash.update(hashInput.array(), 0, hashInput.available());
        final byte[] initialIV_S2C = hash.digest();
View Full Code Here

Examples of net.timewalker.ffmq3.utils.md5.MD5.digest()

  public void testMD5() throws Exception
  {
    MD5 md5 = new MD5();
   
    md5.update("foobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobar".getBytes());
    byte[] result = md5.digest();
   
    System.out.println(StringTools.asHex(result));
  }
}
View Full Code Here

Examples of net.tomp2p.dht.FutureDigest.digest()

        // digest the first entry
        FutureDigest futureDigest = peers[peer20].digest(nr1).all().returnBloomFilter()
                .domainKey(Number160.createHash("my_domain")).start();
        futureDigest.awaitUninterruptibly();
        // we have the bloom filter for the content keys:
        SimpleBloomFilter<Number160> contentBF = futureDigest.digest().contentBloomFilter();
               
        System.out.println("We got bloomfilter for the first key: " + contentBF);
        //TODO: check keyBF.contains(new Number160(123));
        // query for nr2, but return only those that are in this bloom filter
        FutureGet futureGet1 = peers[peer10].get(nr2).all().keyBloomFilter(contentBF)
View Full Code Here

Examples of net.tomp2p.dht.FutureGet.digest()

        Number640 key = new Number640(key480, vKey);
        Assert.assertTrue(dataMap.containsKey(key));
        Assert.assertEquals(data.object(), dataMap.get(key).object());

        // check digest result
        DigestResult digestResult = fget.digest();
        Assert.assertEquals(sortedMap.size(), digestResult.keyDigest().size());
        for (Number160 versionKey : sortedMap.keySet()) {
          Number640 digestKey = new Number640(locationKey, domainKey, contentKey, versionKey);
          Assert.assertTrue(digestResult.keyDigest().containsKey(digestKey));
          Assert.assertEquals(sortedMap.get(versionKey).basedOnSet().size(), digestResult
View Full Code Here

Examples of net.webpasswordsafe.server.plugin.encryption.EsapiDigester.digest()

    {
        EsapiDigester digester = new EsapiDigester(true, "esapi");
        String clearText = "1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890";
        System.out.println("clearText="+clearText);
        System.out.println("clearText.length="+clearText.length());
        String password1 = digester.digest(clearText);
        System.out.println("password1="+password1);
        System.out.println("password1.length="+password1.length());
        String password2 = digester.digest(clearText);
        System.out.println("password2="+password2);
        System.out.println("password2.length="+password2.length());
View Full Code Here

Examples of net.webpasswordsafe.server.plugin.encryption.JasyptDigester.digest()

        JasyptDigester digester = new JasyptDigester();
        digester.setPasswordEncryptor(new StrongPasswordEncryptor());
        String clearText = "1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890";
        System.out.println("clearText="+clearText);
        System.out.println("clearText.length="+clearText.length());
        String password1 = digester.digest(clearText);
        System.out.println("password1="+password1);
        System.out.println("password1.length="+password1.length());
        String password2 = digester.digest(clearText);
        System.out.println("password2="+password2);
        System.out.println("password2.length="+password2.length());
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.