mirror of
https://github.com/dlang/phobos.git
synced 2025-04-26 21:22:20 +03:00
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:
parent
94738ad5c9
commit
6ff6adc5bf
10 changed files with 2510 additions and 13 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue