@15ms/secure 中文文档教程
15ms-secure
15ms 服务器和客户端的安全实用程序。
Usage
npm install --save @15ms/secure
const Secure = require('@15ms/secure');
const secure = new Secure({
secret: 'your-15ms-server-secret',
maxage: 30 * 1000
});
// create hash at client
const data = { 'your': 'data' };
const hash = secure.createHMAC(data);
// verify hash at server
const { data, hash } = request;
if (secure.verifyHMAC(data, hash)) {
// do something
}
15ms-secure
The secure utility for 15ms server and client.
Usage
npm install --save @15ms/secure
const Secure = require('@15ms/secure');
const secure = new Secure({
secret: 'your-15ms-server-secret',
maxage: 30 * 1000
});
// create hash at client
const data = { 'your': 'data' };
const hash = secure.createHMAC(data);
// verify hash at server
const { data, hash } = request;
if (secure.verifyHMAC(data, hash)) {
// do something
}
更多
你可能也喜欢
- 8base-sdk 中文文档教程
- @2ndaddress/sa-icon-logos 中文文档教程
- @4geit/rct-matrix-component 中文文档教程
- @5alid/schema 中文文档教程
- @77io/sh-script-builder 中文文档教程
- @9softstudio/react-datepicker 中文文档教程
- @a11ygato/audit-engine 中文文档教程
- @abcnews/scrollyteller-video 中文文档教程
- @abhijit945org/try-semantic-versioning 中文文档教程
- @accurat/react-components 中文文档教程