mirror of
https://github.com/wkulhanek/bonob.git
synced 2025-12-21 17:33:29 +01:00
12 lines
330 B
TypeScript
12 lines
330 B
TypeScript
import encryption from '../src/encryption';
|
|
|
|
describe("encrypt", () => {
|
|
const e = encryption("secret squirrel");
|
|
|
|
it("can encrypt and decrypt", () => {
|
|
const value = "bobs your uncle"
|
|
const hash = e.encrypt(value)
|
|
expect(hash.encryptedData).not.toEqual(value);
|
|
expect(e.decrypt(hash)).toEqual(value);
|
|
});
|
|
}) |