chiark / gitweb /
New secret ballot machinery
[modbot-mtm.git] / common.pl
diff --git a/common.pl b/common.pl
new file mode 100644 (file)
index 0000000..e149b91
--- /dev/null
+++ b/common.pl
@@ -0,0 +1,11 @@
+our $hashlen=32;
+
+sub hash ($) {
+    my $r= `echo $_[0] | sha256sum`; $? and die $?;
+    $r =~ s/ *\-$//;
+    chomp $r;
+    return $r;
+}
+
+
+1;