MCPcopy Index your code
hub / github.com/dmarman/sha256algorithm / hexToBinary

Function hexToBinary

src/classes/utils.js:13–17  ·  view source on GitHub ↗
(hex)

Source from the content-addressed store, hash-verified

11}
12
13export function hexToBinary(hex) {
14 let decimal = chunkString(hex, 2).map(value => parseInt(value, 16));
15
16 return decimal.map(value => decimalToBinary(value).padStart(8, '0')).join('');
17}
18
19export function hexToString(hex) {
20 let decimal = chunkString(hex, 2).map(value => parseInt(value, 16));

Callers 2

onInputBaseChangeFunction · 0.90
paddingFunction · 0.85

Calls 2

chunkStringFunction · 0.70
decimalToBinaryFunction · 0.70

Tested by

no test coverage detected