'Generate new secret string.
The generator method will check for a known method type and if found
generates a hashed string which is then routed to the appropriate
method.
:param pw_type: ``str``  Type of secret to generate.
:returns: ``str``'

def generator(self, pw_type):

    if hasattr(self, ('_%s_gen' % pw_type)):
        encoded_bytes = self._encode_bytes()
        func = getattr(self, ('_%s_gen' % pw_type))
        return func(encoded_bytes=encoded_bytes)
    else:
        raise SystemExit(('Unknown    secret    type    passed.    [    %s    ]' % pw_type))
