1.0.4 • Published 5 years ago

zym-chipper v1.0.4

Weekly downloads
1
License
UNLICENSED
Repository
-
Last release
5 years ago

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.

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago