DCPcrypt
delphi dcp component
TDCP_md5
md5 String;
md5 stream;流文件
procedure TForm1.Button1Click(Sender: TObject);
var
hashd: array [ .. ] of Byte;
abytes: TByteDynArray;
s: string;
read, len: integer;
ast: AnsiString;
begin
ast := '中国';
self.DCP_md51.Init;
self.DCP_md51.UpdateStr(ast);
self.DCP_md51.Final(hashd);
len := DCP_md51.HashSize;
s := '';
for Read := to ((len div ) - ) do
s := s + IntToHex(hashd[Read], );
Caption := s;
end; procedure TForm1.Button2Click(Sender: TObject);
var
hashd: array [ .. ] of Byte;
s: string;
read, len: integer;
ast: string;
begin
ast := '中国';
self.DCP_md51.Init;
self.DCP_md51.UpdateStr(ast);
self.DCP_md51.Final(hashd);
len := DCP_md51.HashSize;
s := '';
for Read := to ((len div ) - ) do
s := s + IntToHex(hashd[Read], );
Caption := s; end; procedure TForm1.Button3Click(Sender: TObject);
var
hashd: array [ .. ] of Byte;
s: string;
read, len: integer;
ast: AnsiString;
begin
ast := '中国';
self.DCP_sha11.Init;
self.DCP_sha11.UpdateStr(ast);
self.DCP_sha11.Final(hashd);
len := DCP_sha11.HashSize;
s := '';
for Read := to ((len div ) - ) do
s := s + IntToHex(hashd[Read], );
Caption := s;
end;
stream
procedure TForm1.Button1Click(Sender: TObject);
var
hashd: array [ .. ] of Byte;
s: string;
read, len: integer;
ast: AnsiString;
ss: TStringStream;
begin
ast := '中国';
ss := TStringStream.Create;
ss.WriteString('ww'); self.DCP_md51.Init;
DCP_md51.UpdateStream(ss, ss.Size);
self.DCP_md51.Final(hashd);
ss.Free; len := DCP_md51.HashSize;
s := '';
for Read := to ((len div ) - ) do
s := s + IntToHex(hashd[Read], );
Caption := s;
end;
DCPcrypt的更多相关文章
- Dll中调用dcpcrypt
可先在EXE中加入控件来参考,如要导出给其它语言调用参数得用PChar,XE以上的估计得再调整,待实用时再测试 如下代码在2007中可直接导出使用 uses Windows, SysUtils, DC ...
- 著名加密库收集 Encrypt
CryptoAPI 微软的CryptoAPI crypt32.lib,advapi32.lib,cryptui.lib #include <wincrypt.h>#include < ...
- KbmMW资源汇总(更新中…)
KbmMW框架是收费的,不在此提供下载,如需购买,请自行联系作者Kim Madsen. 网址资源: 官网主页:http://www.components4programmers.com/product ...
- 也谈.Net中间语言——破解Delphi2CS行数和时间限制
其实我一直在研究将Delphi版的传奇2源代码使用C#实现,不过由于我并没有学习过Delphi.就只能说先试着用一些工具转换代码. 后来我在网上找到了一款软件:Delphi2CS.这款软件比较强大,虽 ...
- KbmMW 4.40.00 正式版发布
经过快3个月的测试,kbmmw 4.40 正式版终于在圣诞节前发布了. We are happy to announce the availability of a new kbmMW release ...
- KbmMW-及相关
KbmMW框架是收费的,不在此提供下载,如需购买,请自行联系作者Kim Madsen. 网址资源: 官网主页:http://www.components4programmers.com/product ...
- KbmMW资源汇总(特别是xalion的文章)
KbmMW框架是收费的,不在此提供下载,如需购买,请自行联系作者Kim Madsen. 网址资源: 官网主页:http://www.components4programmers.com/product ...
随机推荐
- java中参数传递
一.参数是基本类型 相当于C++传值调用,方法中的形参是实参的副本. 二.参数是类类型 类类型的参数在方法调用中,相当于C++中的传址调用.形参是实参引用同一个对象.所有形参修改则实参也修改了 三.总 ...
- Velocity模板中的注释
Velocity ——VTL模板中的注释 注释允许在模板中包含描述文字,而这些文字不会被放置到模板引擎的输出中.注释是一种有效的提醒自己和向别人解释你的VTL语句要做什么事情的方法.你也可以把注释用来 ...
- maven-source 1.3 中不支持注释请使用 -source 5 或更高版本以启用注释
解决办法:在pom里 加上以下代码 <build> <plugins> <plugin> <groupId>org.apache.maven.plugi ...
- jsp之jstl标签
常用jstl标签 一.<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> ...
- Qt之等待提示框(QTimer)
简述 上节讲述了关于QPropertyAnimation实现等待提示框的显示,本节我们使用另外一种方案来实现-使用定时器QTimer,通过设置超时时间定时更新图标达到旋转效果. 简述 效果 资源 源码 ...
- 51nod1175 区间中第K大的数
裸的主席树. #include<cstdio> #include<cstring> #include<cctype> #include<algorithm&g ...
- BZOJ 4557 侦查守卫
好迷的树形dp... #include<iostream> #include<cstdio> #include<cstring> #include<algor ...
- 菜鸟学习笔记4——jquery事件
方法 描述 bind() 向匹配元素附加一个或更多事件处理器 blur() 触发.或将函数绑定到指定元素的 blur 事件 change() 触发.或将函数绑定到指定元素的 change 事件 cli ...
- 原型设计工具Axure 建模工具powerdesigner
Licensee:IloveyouAxure Key:UChpuxwbDW6eAIaAf9UujEFSBwN3vpEz9snHvlCQVJGQy4p7WrCyKLLvV5QLvqva 注册用户名: ...
- css的使用技巧资料
http://www.instantshift.com/2010/03/15/47-css-tips-tricks-to-take-your-site-to-the-next-level/ http: ...