encoders/hash/siphash

This commit is contained in:
thomashaw
2018-11-05 12:32:39 +00:00
committed by ts
parent 4dbf064f48
commit 0d3cdedc19
6 changed files with 42 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
#!/usr/bin/ruby
require_relative '../../../../../lib/objects/local_hash_encoder.rb'
class SipHashEncoder < HashEncoder
def initialize
super
self.module_name = 'SipHash Encoder'
end
def hash_function(string)
Digest::SipHash.hexdigest(string)
end
end
SipHashEncoder.new.run

View File

@@ -0,0 +1,22 @@
<?xml version="1.0"?>
<encoder xmlns="http://www.github/cliffe/SecGen/encoder"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.github/cliffe/SecGen/encoder">
<name>SipHash Encoder</name>
<author>Thomas Shaw</author>
<module_license>MIT</module_license>
<description>Generates a SipHash digest for each of the strings.</description>
<type>hash</type>
<type>siphash</type>
<platform>linux</platform>
<platform>windows</platform>
<read_fact>strings_to_encode</read_fact>
<read_fact>salt</read_fact>
<read_fact>return_salts</read_fact>
<output_type>string</output_type>
</encoder>

View File