Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Delphi-News aus aller Welt (https://www.delphipraxis.net/58-delphi-news-aus-aller-welt/)
-   -   Functions to calculate the hash of strings and files (https://www.delphipraxis.net/197669-functions-calculate-hash-strings-files.html)

DP News-Robot 25. Aug 2018 22:30

Functions to calculate the hash of strings and files
 
Then have a number of functions to calculate the hash (MD5, SHA1, SHA224, SHA256, SHA 384, SHA 512, BobJenkins) of strings and files. Tested in RAD Studio 10 - Berlin function GetStrHashMD5(Str: String): String; var HashMD5: THashMD5; begin HashMD5: = THashMD5.Create; HashMD5.GetHashString (Str); result: = HashMD5.GetHashString (Str); end;*function GetStrHashSHA1(Str: String): String; var HashSHA: THashSHA1; begin HashSHA: = THashSHA1.Create; HashSHA.GetHashString (Str); result: = HashSHA.GetHashString (Str); end;*function GetStrHashSHA224(Str: String): String; var HashSHA: THashSHA2; begin HashSHA: = THashSHA2.Create; HashSHA.GetHashString (Str); result: = HashSHA.GetHashString (Str, SHA224); end;*function GetStrHashSHA256(Str: String): String; var HashSHA: THashSHA2; begin HashSHA: = THashSHA2.Create; HashSHA.GetHashString (Str); result: = HashSHA.GetHashString (Str, SHA256); end;*function GetStrHashSHA384(Str: String): String; var HashSHA: THashSHA2; begin HashSHA: = T

Weiterlesen...


Alle Zeitangaben in WEZ +1. Es ist jetzt 05:48 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz