@lemonldap-ng/crypto
TypeScript icon, indicating that this package has built-in type declarations

0.6.4 • Public • Published

@lemonldap-ng/crypto

@lemonldap-ng/crypto provide encrypt/decrypt methods used by LemonLDAP::NG system.

This library is compatible with LemonLDAP::NG >= 2.0.5.

Usage:

import Crypto from '@lemonldap-ng/crypto`;
import {expect} from 'expect';
// or with expect < 28
import expect from 'expect';

const encrypter = new Crypto(key); // key is an ascii string, the real key is sha256(key)

let encryptedString = encrypter.encrypt(data);

let decryptedString = encrypter.decrypt(encryptedString);

expect(decryptedString).toEqual(data)

@lemonldap-ng/conf-cdbi is a component of lemonldap-ng-handler, a Node.js handler for LemonLDAP::NG WebSSO.

Package Sidebar

Install

npm i @lemonldap-ng/crypto

Weekly Downloads

2

Version

0.6.4

License

GPL-2.0-or-later

Unpacked Size

46.1 kB

Total Files

9

Last publish

Collaborators

  • xguimard