【文件属性】:
文件名称:hash-obj:获取对象的哈希
文件大小:5KB
文件格式:ZIP
更新时间:2021-04-29 11:36:57
JavaScript
哈希对象
获取对象的哈希
安装
$ npm install hash-obj
用法
import hashObject from 'hash-obj' ;
hashObject ( { ':unicorn:' : ':rainbow:' } , { algorithm : 'sha1' } ) ;
//=> '3de3bc784035b559784fc276f47493d60555fba3'
原料药
hashObject(对象,选项?)
目的
类型: object
选项
类型: object
编码方式
类型: 'hex' | 'base64' | 'buffer' | 'latin1' 'hex' | 'base64' | 'buffer' | 'latin1' 默认值: 'hex'
返回的哈希的编码。
算法
类型: string 默认值: 'sha512' 值'md5' 'sha1' 'sha256' 'sha512
【文件预览】:
hash-obj-main
----index.js(449B)
----test.js(407B)
----package.json(851B)
----index.test-d.ts(421B)
----readme.md(945B)
----.github()
--------workflows()
----license(1KB)
----index.d.ts(1KB)
----.gitignore(23B)
----.npmrc(19B)
----.editorconfig(175B)
----.gitattributes(19B)