SHA1 encryption algorithm implementation