'Return the secret_key, converted to bytes and cached.'

def secret_key_bytes(self):

    if (not hasattr(self, '_secret_key_bytes')):
        key = self.secret_key()
        if (key is None):
            self._secret_key_bytes = None
        else:
            self._secret_key_bytes = codecs.encode(key, 'utf-8')
    return self._secret_key_bytes
