react-use icon indicating copy to clipboard operation
react-use copied to clipboard

New Hook: useEncryptedSessionStorage

Open amirfakhrullah opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe. Some of my projects requires useSessionStorage hooks but with storage encryption.

Describe the solution you'd like useEncryptedSessionStorage that extends useSessionStorage hook with storage encryption with the help of encrypt-storage package by michelonsouza.

Usage of the hook would be like:

const [state, setState] = useEncryptedSessionStorage({
    secretKey: "mySecretKey",
    key: "state1"
});

Describe alternatives you've considered Creating my own custom useEncryptedSessionStorage. I realized that someone else might need to use something like this, so I decided that maybe I can contribute to react-use for this hook.

amirfakhrullah avatar Jun 03 '22 08:06 amirfakhrullah

Awesome!. would you like to add it in my repository?

childrentime avatar Sep 19 '22 17:09 childrentime