zym-chipper
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

ZYM CHIPPER

yarn add zym-chipper

  import { encrypt, decrypt, migrate } from 'zym-chipper';
  
  const encrypted = encrypt('secret text', 'private secret');
  decrypt(encrypted, 'private secret');
  const newEncryption = migrate(encrypted, 'private secret', 'new private secret');

encrypt(data: string, salt?: string) - encrypts data with optional passed salt.

decrypt(data: string, salt?: string) - decrypts data with optional passed salt. Salt is required when encrypted with one.

enzym(data: string) - encrypts data and returns it with ZYM! prefix.

dezym(data: string) - if data has ZYM! prefix then decrypts it, if not then returns data back.

migrate(data: string, previuosSalt?: string, newSalt?: string) - decrypts data then encrypts it again with new salt.

/zym-chipper/

    Package Sidebar

    Install

    npm i zym-chipper

    Weekly Downloads

    1

    Version

    1.0.4

    License

    UNLICENSED

    Unpacked Size

    4.5 kB

    Total Files

    5

    Last publish

    Collaborators

    • grinry