MCPcopy
hub / github.com/ShizukuIchi/pdf-editor / processPasswordR5

Function processPasswordR5

public/makeTextPDF.js:59402–59412  ·  view source on GitHub ↗
(password = '')

Source from the content-addressed store, hash-verified

59400function processPasswordR2R3R4(password = '') {
59401 const out = new Buffer(32);
59402 const length = password.length;
59403 let index = 0;
59404
59405 while (index < length && index < 32) {
59406 const code = password.charCodeAt(index);
59407
59408 if (code > 0xff) {
59409 throw new Error('Password contains one or more invalid characters.');
59410 }
59411
59412 out[index] = code;
59413 index++;
59414 }
59415

Callers 1

_setupEncryptionV5Method · 0.85

Calls 2

saslprepFunction · 0.85
createMethod · 0.80

Tested by

no test coverage detected