The crypto module of Abu has some pure JS implementation of commonly used hash functions and random id generators.
These modules use the WebCrypto API, its Browser and its NodeJs equivalent to generate the random ids and the cryptographic hashes such as SHA256 and SHA512.