siphash ~master
D implementation of SipHash.
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
siphash-d
D implementation of SipHash.
Install
shiphash-d is only one file. Please copy src/siphash.d onto your project.
Usage
siphash24Of function.
siphash24Of is pre-defined function.
import siphash;
ubyte[16] k = cast(ubyte[])"To be|not to be!";
ubyte[] msg = cast(ubyte[])"that is the question.";
auto hashed = siphash24Of(k, msg);
You can use siphash template for other SipRound pair.
alias siphash!(1, 2).siphashOf siphash12Of;
SipHash object
SipHash provides std.digest like API.
import siphash;
ubyte[16] key = cast(ubyte[])"To be|not to be!";
auto sh = SipHash!(2, 4)(key);
sh.start();
sh.put(cast(ubyte[])"that is the question.");
auto hashed = sh.finish();
Link
official site
Copyright
Copyright (c) 2012- Masahiro Nakagawa
Distributed under the Boost Software License, Version 1.0.
- ~master released 8 years ago
- repeatedly/siphash-d
- github.com/repeatedly/siphash-d
- Boost Software License, Version 1.0
- Authors:
- Dependencies:
- none
- Versions:
-
~master 2016-Jan-19 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
182 downloads total
-
- Score:
- 0.8
- Short URL:
- siphash.dub.pm