string2key utility function

Interpret the S2K systems, modulo the actual hashing.