Split up the sha1 method into 3 resuable pieces