1.0.6 • Published 2 years ago
@guanghechen/cipher v1.0.6
Utility functions for cipher contents.
Install
npm
npm install --save @guanghechen/cipheryarn
yarn add @guanghechen/cipher
Usage
AesCipher/AesCipherFactoryimport { AesGcmCipherFactory } from '@guanghechen/cipher' const cipherFactory = new AesGcmCipherFactory() const secret = cipherFactory.createRandomSecret() cipherFactory.initFromSecret(secret) const cipher = cipherFactory.cipher() // encrypt const originalContent = fs.readFileSync(sourceFilepath) const { cryptBytes, authTag } = cipher.encrypt(originalContent) // decrypt const plainBytes: Buffer = cipher.decrypt(cryptBytes, { authTag })
Overview
| Name | Description |
|---|---|
AesGcmCipher | A ICipher implementation with AES-256-GCM algorithm. |
AesGcmCipherFactory |
1.0.6
2 years ago
1.0.5
2 years ago
1.0.2
2 years ago
1.0.1
2 years ago
1.0.0
2 years ago
1.0.4
2 years ago
1.0.3
2 years ago
1.0.0-alpha.22
2 years ago
1.0.0-alpha.21
2 years ago
1.0.0-alpha.20
2 years ago
1.0.0-alpha.19
2 years ago
1.0.0-alpha.18
3 years ago
1.0.0-alpha.16
3 years ago
1.0.0-alpha.17
3 years ago
1.0.0-alpha.15
3 years ago
1.0.0-alpha.14
3 years ago
1.0.0-alpha.13
3 years ago
1.0.0-alpha.12
3 years ago
1.0.0-alpha.11
3 years ago
1.0.0-alpha.10
3 years ago
1.0.0-alpha.9
3 years ago
1.0.0-alpha.8
3 years ago
1.0.0-alpha.7
3 years ago
1.0.0-alpha.6
3 years ago
1.0.0-alpha.5
3 years ago
1.0.0-alpha.4
3 years ago
1.0.0-alpha.3
3 years ago
1.0.0-alpha.2
3 years ago
1.0.0-alpha.1
3 years ago