InfraRuby Vision delivers solutions for mobile and web applications.
You can try InfraRuby live in your browser!
Try the InfraRuby statically typed Ruby compiler live in your browser. Try our examples or write your own code.
Follow @InfraRuby on Twitter for news and updates.

InfraRuby gems: siphash-ir

siphash-ir is a substitute gem for InfraRuby to compute the SipHash of a String.

To install siphash-ir, type in a privileged shell:

gem install siphash-ir

SipHash is a function of a 128-bit key and a variable-length message. SipHash is used in InfraRuby to compute the hash of a String with a random key to prevent collision attacks on Hash and Set.

You can use siphash-ir to compute a SipHash, like this:

require "siphash-ir"

key = "0123456789ABCDEF"

puts SipHash.digest(key, "hello, world")

Try the InfraRuby statically typed Ruby compiler live in your browser. You can use InfraRuby for your own projects with our free download!

Follow @InfraRuby on Twitter
Copyright © 2011-2017 InfraRuby Vision Limited