mirror of
https://github.com/mickael-kerjean/filestash.git
synced 2025-11-02 11:57:04 +08:00
21 lines
709 B
JavaScript
21 lines
709 B
JavaScript
// import assert from 'assert';
|
|
// import { encrypt, decrypt } from '../client/helpers/';
|
|
|
|
// describe("Helper::crypto", function() {
|
|
// it("can encrypt", function() {
|
|
// const key = "SUPER_KEY";
|
|
// const obj = {a: 3, b:4}
|
|
// const encrypted_obj = encrypt(obj, key);
|
|
// assert.ok(encrypted_obj);
|
|
// assert.notEqual(obj, encrypted_obj);
|
|
// });
|
|
// it("can decrypt", function() {
|
|
// const key = "SUPER_KEY";
|
|
// const obj = {a: 3, b:4}
|
|
// const encrypted_obj = encrypt(obj,key);
|
|
// const decrypted_obj = decrypt(encrypted_obj, key);
|
|
// assert.equal(JSON.stringify(obj), JSON.stringify(decrypted_obj));
|
|
// });
|
|
|
|
// });
|