Skip to main content

encryptString

Encrypts a string using AES-256-CBC.

  • import the method
import { encryptString, generateRandomBytes } from "nodelpers";
  • params
text: string;
key: Buffer<ArrayBufferLike>;
  • usage
encryptString("Hello World!", generateRandomBytes(32));