MCPcopy Index your code
hub / github.com/browserless/browserless / decrypt

Function decrypt

src/utils.ts:890–899  ·  view source on GitHub ↗
(encryptedText: string, secret: Buffer)

Source from the content-addressed store, hash-verified

888};
889
890export const decrypt = (encryptedText: string, secret: Buffer) => {
891 const [encrypted, iv] = encryptedText.toString().split(encryptionSep);
892 if (!iv) throw new ServerError('Bad or invalid encrypted format');
893 const decipher = crypto.createDecipheriv(
894 encryptionAlgo,
895 secret,
896 Buffer.from(iv, 'hex'),
897 );
898 return decipher.update(encrypted, 'hex', 'utf8') + decipher.final('utf8');
899};
900
901interface RequestInitTimeout extends RequestInit {
902 timeout?: number;

Callers 1

readMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected