expanded makeHash to output other encodings
encapsulated related methods into global Security object