MCPcopy Index your code
hub / github.com/smallfawn/QLScriptPublic / pad

Function pad

backup/sysxc.js:376–379  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

374const BLOCK_SIZE = 16;
375
376function pad(text) {
377 const padding = BLOCK_SIZE - text.length % BLOCK_SIZE;
378 return text + String.fromCharCode(padding).repeat(padding);
379}
380
381function unpad(text) {
382 const padding = text.charCodeAt(text.length - 1);

Callers 2

aesEncryptFunction · 0.70
aesEncryptFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected