0.0.50 • Published 3 years ago
@signuply/secret v0.0.50
@signuply/secret
import { createSecretClient } from '@signuply/secret';
import assert from 'assert';
const secretClient = createSecretClient({
encryptionKey: '<128BITS_KEY>',
});
// generate cryptographic secret
const secret = await secretClient.generate();
// encrypt with aes-256-cbc
const encrypted = secretClient.encrypt(secret);
const decrypted = secretClient.decrypt(encrypted);
assert.equal(secret, decrypted);
// generate cyptographic hash with hmac algorithm
const hash = secretClient.hash(secret);
0.0.43
3 years ago
0.0.44
3 years ago
0.0.45
3 years ago
0.0.46
3 years ago
0.0.47
3 years ago
0.0.50
3 years ago
0.0.48
3 years ago
0.0.49
3 years ago
0.0.41
3 years ago
0.0.42
3 years ago
0.0.40
3 years ago
0.0.34
3 years ago
0.0.35
3 years ago
0.0.36
3 years ago
0.0.37
3 years ago
0.0.38
3 years ago
0.0.39
3 years ago
0.0.33
3 years ago
0.0.32
3 years ago
0.0.31
3 years ago