(require-library srfi-4 numbers) (module siphash () (import chicken scheme srfi-4 numbers) (export make-siphash siphash-2-4 siphash-4-8) (define bytevector-length u8vector-length) (define bytevector-u8-ref u8vector-ref) (define bytevector-copy subu8vector) (define bytevector? u8vector?) (define string->utf8 (lambda (x) (blob->u8vector (string->blob x)))) (define-type bytevector u8vector) (define-type input (or string bytevector)) (define-type siphash (input #!optional input -> (or (input -> fixnum) fixnum))) (: make-siphash (fixnum fixnum -> siphash)) (: siphash-2-4 siphash) (: siphash-4-8 siphash) (include "siphash.scm"))