Add new hash API

* adds the new API used for hashes/digests
* adds new crc & md modules using this API
* deprecate std.md5 & crc32
* update std.stream to use new hash API
This commit is contained in:
Johannes Pfau 2012-07-01 15:24:11 +02:00
parent 94738ad5c9
commit 6ff6adc5bf
10 changed files with 2510 additions and 13 deletions

View file

@ -58,6 +58,10 @@ public import std.zip;
public import std.zlib;
public import std.net.isemail;
public import std.net.curl;
public import std.digest.digest;
public import std.digest.crc;
public import std.digest.sha;
public import std.digest.md;
int main(char[][] args)
{
@ -126,6 +130,11 @@ version (all)
bool isEmail = std.net.isemail.isEmail("abc");
auto http = std.net.curl.HTTP("dlang.org");
auto uuid = randomUUID();
auto md5 = md5Of("hello");
auto sha1 = sha1Of("hello");
auto crc = crc32Of("hello");
auto string = toHexString(crc);
}
puts("Success!");
return 0;