Implement sha1 function for the kernel module