Changed k constants and logic to SHA1.