Example #1
0
        public static string HashWords(this string text, byte[] key)
        {
            if (text == null || key == null)
            {
                return(text);
            }

            using var hmac = new HMACMD5(key);
            return(WordRegex.Replace(text, match => hmac.HashWord(match.Value.ToLower())));
        }