/** * Creates new {@link Threefish} encryptor. */ public static CryptoEngine threefish(String password) { final Threefish threefish = new Threefish(512); threefish.init(password, 0x1122334455667788L, 0xFF00FF00AABB9933L); return new CryptoEngine() { @Override public byte[] encryptString(final String input) { return threefish.encryptString(input); } @Override public String decryptString(final byte[] encryptedContent) { return threefish.decryptString(encryptedContent); } }; }
@BeforeEach void setUp() { threefish = new Threefish(Threefish.BLOCK_SIZE_BITS_1024); threefish.init("This is a key message and I feel good", 0x1122334455667788L, 0xFF00FF00AABB9933L); }
/** * Creates new {@link Threefish} encryptor. */ public static CryptoEngine threefish(String password) { final Threefish threefish = new Threefish(512); threefish.init(password, 0x1122334455667788L, 0xFF00FF00AABB9933L); return new CryptoEngine() { @Override public byte[] encryptString(final String input) { return threefish.encryptString(input); } @Override public String decryptString(final byte[] encryptedContent) { return threefish.decryptString(encryptedContent); } }; }