Second revision

Since the SHA-1 hash method is used both at the level of key generation
and cryptography, it's best to make it its own class if we are to
separate the cryptography functions.