MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / OS2IP

Method OS2IP

modules/crypt/etc/pkcs1.js:80–86  ·  view source on GitHub ↗
(OS)

Source from the content-addressed store, hash-verified

78 return c.buffer;
79 };
80 static OS2IP(OS) {
81 if (OS instanceof Uint8Array) {
82 let offset = OS.byteOffset;
83 OS = OS.buffer.slice(offset, offset + OS.byteLength);
84 }
85 return BigInt.fromArrayBuffer(OS);
86 };
87 static randint(max) {
88 var i = BigInt.fromArrayBuffer(RNG.get(BigInt.bitLength(max) >>> 3));
89 while (i >= max)

Callers 4

verifyMethod · 0.80
decryptMethod · 0.80
verifyMethod · 0.80
verifyMethod · 0.80

Calls 2

sliceMethod · 0.65
fromArrayBufferMethod · 0.65

Tested by

no test coverage detected