Instantly share code, notes, and snippets.

Embed
What would you like to do?
encryptToken :: (ToJSON t, MonadCypher m) => t -> m String
encryptToken = encryptJson . toJson
decryptToken :: (FromJSON t, MonadCypher m) => String -> m (Maybe t)
decryptToken str = (fmap . fmap) fromJson (decryptJson str)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment