0.2.0 • Published 3 years ago

@shhdev/utils v0.2.0

Weekly downloads
-
License
-
Repository
-
Last release
3 years ago

@shhdev/utils

Shared utilities used across shh packages to create a unified experience.

Functions

encrypt

Creates an encrypted string from an input using a secret string and a salt string

PropertyTypeRequiredDescription
valuestringtrueValue to encrypt
secretstringtrueSecret key used to encrypt
saltstringtrueSalt value used to provide randomness

decrypt

Decrypts an encrypted string with the secret string and salt string that were used to create it

PropertyTypeRequiredDescription
valuestringtrueValue to encrypt
secretstringtrueSecret key used to encrypt
saltstringtrueSalt value used to provide randomness

hash

Creates a hashed string from an input string and salt string which can be used to compare to another hashed value

PropertyTypeRequiredDescription
valuestringtrueValue to hash
saltstringtrueSalt value used to provide randomness