Skip to content
Branch: master
Go to file
Code

Latest commit

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 

README.markdown

Build Status

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

Copyright

Copyright (c) 2012- Masahiro Nakagawa

Distributed under the Boost Software License, Version 1.0.

About

D implementation of SipHash

Resources

License

Releases

No releases published
You can’t perform that action at this time.