MCPcopy
hub / github.com/remotely-save/remotely-save / decryptBase64urlToString

Function decryptBase64urlToString

src/encryptOpenSSL.ts:152–164  ·  view source on GitHub ↗
(
  text: string,
  password: string,
  rounds: number = DEFAULT_ITER
)

Source from the content-addressed store, hash-verified

150};
151
152export const decryptBase64urlToString = async (
153 text: string,
154 password: string,
155 rounds: number = DEFAULT_ITER
156) => {
157 return new TextDecoder().decode(
158 await decryptArrayBuffer(
159 bufferToArrayBuffer(base64url.parse(text, { loose: true })),
160 password,
161 rounds
162 )
163 );
164};
165
166export const getSizeFromOrigToEnc = (x: number) => {
167 if (x < 0 || Number.isNaN(x) || !Number.isInteger(x)) {

Callers

nothing calls this directly

Calls 2

bufferToArrayBufferFunction · 0.90
decryptArrayBufferFunction · 0.85

Tested by

no test coverage detected