5.1.2 • Published 2 years ago

@gasbuddy/kms-crypto v5.1.2

Weekly downloads
191
License
MIT
Repository
github
Last release
2 years ago

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');
})();
5.1.2

2 years ago

5.1.1

2 years ago

5.1.0

2 years ago

5.0.1

2 years ago

5.0.0

2 years ago

4.3.0

4 years ago

4.2.1

4 years ago

4.2.0

5 years ago

4.1.0

5 years ago

4.0.1

6 years ago

3.0.1

6 years ago

3.0.0

6 years ago

1.3.5

7 years ago

1.3.4

7 years ago

1.3.3

7 years ago

1.3.2

7 years ago

1.3.0

7 years ago

1.2.4

7 years ago

1.2.3

7 years ago

1.2.2

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.2

7 years ago

1.0.1

8 years ago

1.0.0

8 years ago