1.0.4 • Published 12 months ago

@jihyunlab/web-secret v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

@jihyunlab/web-secret

Version Downloads Last commit License Linter code style: prettier\ Build Lint codecov

@jihyunlab/web-secret provides functionality in web applications to decrypt .env files encrypted with @jihyunlab/secret-cli.

The encryption function is implemented with @jihyunlab/web-crypto and provides encryption for AES 256 GCM.

Installation

npm i @jihyunlab/web-secret

Usage

Decrypt the .env key value by directly entering the separately managed encryption key.

import { CIPHER, Env } from '@jihyunlab/web-secret';

const cipher = await Env.createCipher(CIPHER.AES_256_GCM, 'YourSecretKey');
const value = await cipher.decrypt(process.env.ENV_KEY);

Encryption key

In web applications, since it's not possible to retrieve system or user environment variables, it's recommended to manage and directly input encryption keys separately.

Credits

Authored and maintained by JihyunLab <info@jihyunlab.com>

License

Open source licensed as MIT.

1.0.4

12 months ago

1.0.3

12 months ago

1.0.2

12 months ago

1.0.1

12 months ago

1.0.0

12 months ago