Skip to content

Latest commit

 

History

History
25 lines (16 loc) · 765 Bytes

File metadata and controls

25 lines (16 loc) · 765 Bytes

@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.