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)
Generate new secret string.
dataset/ETHPy150Open openstack/openstack-ansible/scripts/pw-token-gen.py/CredentialGenerator.generator