A Ruby implementation of ZK-SNARK friendly hash function Poseidon
Add the gem to your Gemfile:
gem 'poseidon_hash'Invoke the following command from your terminal:
gem install poseidon_hasharity = 4
input = [1503630248886929420551238620595986459413104881269505529735919576753875242303, 4398046511124, 0, 0]
Poseidon::Hash.new.hash(input, arity)If you have problems or improvements, please create a GitHub Issue.
Thank you, contributors!
This code is free to use under the terms of the MIT license.