fix invalid SHA1 hash generation