Socket
Book a DemoInstallSign in
Socket

@gasbuddy/kms-crypto

Package Overview
Dependencies
Maintainers
3
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gasbuddy/kms-crypto

Crytography operations that use Amazon Key Management Service, with reasonable development time proxies

latest
Source
npmnpm
Version
5.1.2
Version published
Maintainers
3
Created
Source

kms-crypto

main CI

npm version

The kms-crypto module creates a generic interface for Key Management Services which allows reasonably flexible usage between true cloud providers (currently only AWS) and local encryption (mostly for development).

The key resource name is used to differentiate between the service providers, and the service provider is embedded in encrypted values (e.g. ciphertext). PLEASE NOTE - the examples use null:whatever but DO NOT USE THAT IN PRODUCTION CODE. Your key should start with kms: and you should get that key ARN from the ops team.

import assert from 'assert';
import { createKmsCryptoProvider } from '@gasbuddy/kms-crypto';

(async () => {
  const kms = createKmsCryptoProvider({});
  const encBlob = kms.encrypt('null:whatever', 'somethingunique', 'testing123');
  const decBlob = kms.decrypt('somethingunique', encBlob);
  assert.equals(decBlob.toString(), 'testing123');
})();

Keywords

gasbuddy

FAQs

Package last updated on 13 Oct 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts