diff --git a/ImageBoardServerApp/Util/TheManager.cs b/ImageBoardServerApp/Util/TheManager.cs index 1e43657..1bbcbf9 100644 --- a/ImageBoardServerApp/Util/TheManager.cs +++ b/ImageBoardServerApp/Util/TheManager.cs @@ -1,3 +1,4 @@ +using System.Security.Cryptography; using ImageBoardServerApp.Data; using ImageBoardServerApp.Data.Repository; @@ -93,4 +94,15 @@ public class TheManager { return await CommentsRepository.getCommentByGETAsync(board, GET) != null; } + + public static string getmd5Hash() + { + var bytes = new byte[16]; + using (var rng = new RNGCryptoServiceProvider()) + { + rng.GetBytes(bytes); + } + + return BitConverter.ToString(bytes).Replace("-", "").ToLower(); + } } \ No newline at end of file