sha256.js说明
文件说明:sha256加密
示例代码:
// 引入sha256函数 import {sha256} from '@/common/js/sha256.js' console.log(sha256('123456')); // 引入sha256对象,提供更多加密方法 import $sha256from '@/common/js/sha256.js' $sha256from .hex_sha256('123456')
此文件对外部提供sha256函数,和sha256对象二种方式。简单的只需要引入sha256函数,如需要增加型加密,可引入sha256对象。
sha256函数方法列表:
@name: sha256(value) @return: [String] @exp: import {sha256} from '@/common/js/sha256.js' console.log(sha256('123456'));
md5对象方法列表:
@name:
$sha256.hex_sha256(value)
$sha256.b64_sha256(value)
$sha256.any_sha256(value, encoding)
$sha256.hex_hmac_sha256(value1, value2)
$sha256.b64_hmac_sha256(value1, value2)
$sha256.any_hmac_sha256(value1, value2, encoding)
@说明: 加密

浙公网安备 33010602011771号