📅  最后修改于: 2022-03-11 14:58:58.682000             🧑  作者: Mango
function genHexString(len) {
const hex = '0123456789ABCDEF';
let output = '';
for (let i = 0; i < len; ++i) {
output += hex.charAt(Math.floor(Math.random() * hex.length));
}
return output;
}