字符串hash值计算
By
笑口常开
at 2019-02-19 • 0人收藏 • 1534人看过
import console;
::Shlwapi := ..raw.loadDll("Shlwapi.dll");
hashNum = function(str){
var hr,hash = ::Shlwapi.HashData(str,#str,{INT value},4);
if(!hr) return hash.value;
}
console.log(hashNum("今天天气不错"))
console.pause(true);
感谢 Travis 提供方案
第二种方案
import console;
import inet.url;
aaa=inet.url.hashNum("今天天d气adsfffffffddfffffffffffffffffffffffffffffff不错")
console.log(aaa)
console.pause(true);
登录后方可回帖