Skip to content

4.0.0

Compare
Choose a tag to compare
@hugoalh hugoalh released this 06 May 08:36
· 46 commits to main since this release

🔦 Spotlights

  • Support algorithms selection: AES-CBC (Default, Original), AES-CTR, AES-GCM (@hugoalh)(N/A)
  • Support custom decoder and encoder (@hugoalh)(N/A)
  • Support deployments JSR, NPM (Original), and remote (@hugoalh)(N/A)
  • Support directly decrypt and encrypt files (@hugoalh)(N/A)
  • Support multiple layers decryption and encryption with different algorithm and passphrase (i.e.: key) (@hugoalh)(N/A)
  • Support targets Bun, Cloudflare Workers, Deno, and NodeJS (Original) (@hugoalh)(N/A)

💥 Break Changes

  • Change default decoder and encoder from Base64 to ASCII85 (@hugoalh)(N/A)
  • Change the way to create instance, use function createSymmetricCryptor instead of class SymmetricCryptor (@hugoalh)(N/A)
  • Multiple layers decryption and encryption require to define at the stage of create instance, and no longer available at the stage of decrypt or encrypt (@hugoalh)(N/A)
  • Refactor and replace NodeJS Crypto APIs (node:crypto) with JavaScript Web Crypto APIs (crypto.subtle) (@hugoalh)(N/A)

    ⚠️ Important

    This refactor cause it is not possible to compatible with any previous version, please make sure to decrypt everything firstly before upgrade to this version or next!

  • Remove class SymmetricCryptor all of the static methods (@hugoalh)(N/A)
  • Remove class SymmetricCryptor constructor (@hugoalh)(N/A)
  • Remove class SymmetricCryptor methods decryptMultipleLine, encryptMultipleLine, and its aliases (@hugoalh)(N/A)
  • Remove functions decrypt, decryptMultipleLine, encrypt, encryptMultipleLine, and its aliases (@hugoalh)(N/A)

〰️ Changes

  • Add class SymmetricCryptor methods decryptFile, decryptFiles, encryptFile, and encryptFiles to directly decrypt and encrypt files (@hugoalh)(N/A)
  • Passphrase (i.e.: key) no longer have any restriction (@hugoalh)(N/A)
  • Support data type of string (Original) and Uint8Array (@hugoalh)(N/A)
  • Support passphrase (i.e.: key) type of string (Original), ArrayBuffer, DataView, Uint8Array, Uint16Array, Uint32Array, and BigUint64Array (@hugoalh)(N/A)