Changed the state logic to SHA-1.