From f422074073a3417549f186d3c84a261c86679243 Mon Sep 17 00:00:00 2001 From: Shahryar Tavakkoli Date: Mon, 15 Apr 2024 15:35:49 +0330 Subject: [PATCH] Add cright doc for simple_hash function --- lib/helper/crypto.ex | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/helper/crypto.ex b/lib/helper/crypto.ex index 34d5a27..8358d74 100644 --- a/lib/helper/crypto.ex +++ b/lib/helper/crypto.ex @@ -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)