Class BlowFishCrypt

java.lang.Object
org.apache.ofbiz.base.crypto.BlowFishCrypt

public class BlowFishCrypt extends Object
Blowfish (Two-Way) Byte/String encryption
  • Constructor Details

    • BlowFishCrypt

      public BlowFishCrypt(SecretKeySpec secretKeySpec)
      Creates a new BlowFishCrypt object.
      Parameters:
      secretKeySpec - A SecretKeySpec object.
    • BlowFishCrypt

      public BlowFishCrypt(File keyFile)
      Creates a new BlowFishCrypt object.
      Parameters:
      keyFile - A file object containing the secret key as a String object.
  • Method Details

    • encrypt

      public byte[] encrypt(String string)
      Encrypt the string with the secret key.
      Parameters:
      string - The string to encrypt.
    • encrypt

      public byte[] encrypt(byte[] bytes)
      Encrypt the byte array with the secret key.
      Parameters:
      bytes - The array of bytes to encrypt.
    • main

      public static void main(String[] args) throws Exception
      Throws:
      Exception