I know nodeJS has an inbuilt crypto library for doing actions such as hashing or generating random values, but does client-side JS have something similar? I want to be able to hash strings on the client-side and avoid sending it to the server to be hashed and then have the server send the hash back. Ideally I would also like to be able to generate cryptographically secure random numbers on the client side too.
Any examples of how to implement this into a simple app would be much appreciated. I have tried using different libraries which I think are meant to be for client-side JS, but they seem very unclear on how exactly they work.