Examples of Blowfish


Examples of gnu.javax.crypto.cipher.Blowfish

      { "FEDCBA9876543210", "FFFFFFFFFFFFFFFF", "6B5C5A9C5D9E0A5A" } };

  public void test(TestHarness harness)
  {
    harness.checkPoint("TestOfBlowfish");
    cipher = new Blowfish();
    HashMap attrib = new HashMap();
    attrib.put(IBlockCipher.CIPHER_BLOCK_SIZE, new Integer(8));
    attrib.put(IBlockCipher.KEY_MATERIAL, new byte[16]);
    try
      {
View Full Code Here

Examples of gnu.javax.crypto.cipher.Blowfish

    // build an OFB-Blowfish cascade
    Cascade ofbBlowfish = new Cascade();
    Object modeNdx = ofbBlowfish.append(Stage.getInstance(
        ModeFactory.getInstance(
            Registry.OFB_MODE, new Blowfish(), 8),
            Direction.FORWARD));

    testcase.attributes.put(modeNdx, testcase.modeAttributes);

    IPad pkcs7 = PadFactory.getInstance(Registry.PKCS7_PAD);
View Full Code Here

Examples of org.jivesoftware.util.Blowfish

     */
    public static String encryptPassword(String password) {
        if (password == null) {
            return null;
        }
        Blowfish cipher = getCipher();
        if (cipher == null) {
            throw new UnsupportedOperationException();
        }
        return cipher.encryptString(password);
    }
View Full Code Here

Examples of org.jivesoftware.util.Blowfish

     */
    public static String decryptPassword(String encryptedPassword) {
        if (encryptedPassword == null) {
            return null;
        }
        Blowfish cipher = getCipher();
        if (cipher == null) {
            throw new UnsupportedOperationException();
        }
        return cipher.decryptString(encryptedPassword);
    }
View Full Code Here

Examples of org.jivesoftware.util.Blowfish

                // for example, when in setup mode.
                if (!keyString.equals(JiveGlobals.getProperty("passwordKey"))) {
                    return null;
                }
            }
            cipher = new Blowfish(keyString);
        }
        catch (Exception e) {
            Log.error(e.getMessage(), e);
        }
        return cipher;
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.