Skip to content

Commit

Permalink
Add cright doc for simple_hash function
Browse files Browse the repository at this point in the history
  • Loading branch information
shahryarjb committed Apr 15, 2024
1 parent dd833c5 commit f422074
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/helper/crypto.ex
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,10 @@ defmodule MishkaDeveloperTools.Helper.Crypto do
> #### Security issue {: .warning}
>
> It is not recommended to use this function for hashing passwords or JWTs.
##### I inspired the initial code from this path:
- https://github.com/malach-it/boruta_auth/blob/master/lib/boruta/oauth/schemas/client.ex#L173
"""
def simple_hash(text, alg, truncated \\ nil) do
:crypto.hash(@simple_hash_algs[alg]["hash_algorithm"], text)
Expand Down

0 comments on commit f422074

Please sign in to comment.