如何使用Delphi散列字符串? [英] How do I hash a string with Delphi?

查看:230
本文介绍了如何使用Delphi散列字符串?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用Delphi创建字符串的MD5哈希值?

How do I make an MD5 hash of a string with Delphi?

推荐答案

如果你想要一个MD5摘要, Indy 组件已安装,您可以执行此操作:

If you want an MD5 digest and have the Indy components installed, you can do this:

uses SysUtils, IdGlobal, IdHash, IdHashMessageDigest;

with TIdHashMessageDigest5.Create do
try
    Result := TIdHash128.AsHex(HashValue('Hello, world'));
finally
    Free;
end;

最受欢迎的算法支持 Delphi加密软件包


  • Haval

  • MD4,MD5

  • RipeMD-128,RipeMD-160

  • SHA-1,SHA-256,SHA-384 ,SHA-512,

  • Tiger

  • Haval
  • MD4, MD5
  • RipeMD-128, RipeMD-160
  • SHA-1, SHA-256, SHA-384, SHA-512,
  • Tiger

更新 $ b DCPCrypt 现在由 Warren Postma 维护可在此处找到。

Update DCPCrypt is now maintained by Warren Postma and source can be found here.

这篇关于如何使用Delphi散列字符串?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆