MCPcopy Create free account
hub / github.com/Useful-Scripts-Extension/useful-script / rhex

Function rhex

scripts/libs/crypto/md5.js:156–162  ·  view source on GitHub ↗
(n)

Source from the content-addressed store, hash-verified

154var hex_chr = "0123456789abcdef".split("");
155
156function rhex(n) {
157 var s = "",
158 j = 0;
159 for (; j < 4; j++)
160 s += hex_chr[(n >> (j * 8 + 4)) & 0x0f] + hex_chr[(n >> (j * 8)) & 0x0f];
161 return s;
162}
163
164function hex(x) {
165 for (var i = 0; i < x.length; i++) x[i] = rhex(x[i]);

Callers 1

hexFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected