【文件属性】:
文件名称:query-string-hash:query-string-hash通过将查询字符串参数加密为一个哈希字符串来隐藏查询字符串参数,该哈希字符串可用作单个查询字符串参数
文件大小:24KB
文件格式:ZIP
更新时间:2021-04-09 01:08:32
JavaScript
查询字符串哈希
加密和解密查询字符串
query-string-hash通过将查询字符串参数加密为两种方式的哈希值来隐藏查询字符串参数。
怎么运行的?
通过对查询参数进行哈希处理将其隐藏在URL中。
使用强密钥对查询参数进行加密。
使用相同的密钥解密并获取JSON。
安装
$ npm install query-string-hash
OR
$ yarn add query-string-hash
该模块使用。 加密和解密字符串,并使用解析字符串。
用法
在加密方面
const { encryptQueryParams } = require ( 'query-string-hash' )
const key = "real secret keys should be long and random" ; //Encryption key (optional) should be
【文件预览】:
query-string-hash-master
----.babelrc(43B)
----index.js(34B)
----package.json(760B)
----package-lock.json(99KB)
----dist()
--------index.js(520B)
--------encrypt.js(640B)
--------decrypt.js(652B)
----src()
--------index.js(137B)
--------encrypt.js(483B)
--------decrypt.js(504B)
----.npmignore(18B)
----.gitignore(12B)
----README.md(2KB)