@alicloud/kms
kms client for alicloud
Last updated a year ago by fengmk2 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @alicloud/kms 
SYNC missed versions from official npm registry.

kms client for alicloud

Install

npm i @alicloud/kms

Usage

const KMSClient = require('@alicloud/kms');

const client = new KMSClient({
  accessKeyId: 'your accessKeyId',
  accessKeySecret: 'your accessKeySecret',
  // must be https url
  endpoint: 'https://kms.{region}.aliyuncs.com', // e.g.: 'https://kms.cn-hangzhou.aliyuncs.com'
});

(async () => {

  const plainText = 'Hello KMS';
  const encryptText = await client.encrypt('my key id', plainText);
  console.log('%s => %s', plainText, encryptText);
  assert.equal(await client.decrypt(encryptText), plainText);

})().catch(err => console.error(err));

Endpoints

see https://help.aliyun.com/document_detail/69006.html

Current Tags

  • 1.0.0                                ...           latest (a year ago)

2 Versions

  • 1.0.0                                ...           a year ago
  • 0.0.0                                ...           a year ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 3
Dependencies (3)
Dev Dependencies (3)
Dependents (1)

Copyright 2014 - 2017 © taobao.org |