AWS API Dlang, hmac sha256 function.

holo via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Oct 5 15:26:34 PDT 2015


On Monday, 5 October 2015 at 21:00:38 UTC, Vladimir Panteleev 
wrote:
> On Monday, 5 October 2015 at 19:43:39 UTC, holo wrote:
>> @Vladimir where can i check or do you know when next version 
>> of phobos will be available?
>
> You can use Digger to get the latest version of D:
>
> https://github.com/CyberShadow/Digger

Thank you, now it is working as expected. Hope i wont miss 
upgrade in my system to uninstall digger version before.

[holo at ultraxps workplace]$ cat ./hmac.d
#!/usr/bin/rdmd

import std.stdio;
import std.digest.sha, std.digest.hmac;
import std.string : representation;

void main()
{
	auto hmac = hmac!SHA256("secretkey".representation);
	hmac.put("texttohash".representation);
	auto digest = hmac.finish();

	writeln(digest);
}

[holo at ultraxps workplace]$ ./hmac.d
[28, 169, 142, 131, 133, 104, 149, 47, 205, 215, 20, 154, 170, 
148, 84, 170, 252, 36, 10, 119, 18, 25, 10, 145, 183, 133, 135, 
252, 26, 124, 215, 6]
[holo at ultraxps workplace]$ dmd --version
DMD64 D Compiler v2.069-devel-5e73c30
Copyright (c) 1999-2015 by Digital Mars written by Walter Bright
[holo at ultraxps workplace]$

Now need try to write some code which will connect me to AWS api 
based on examples.


More information about the Digitalmars-d-learn mailing list