(self)
return bytes(data_string, 'utf-8')
Convert the credential object into bytes for storage.
Convert the credential object into bytes for storage.
Convert the credential object into bytes for storage .
def to_bytes(self):
        """Convert the credential object into bytes for storage."""
        if not self._credential:
            return b''

        data_string = json.dumps(self._credential)
        return bytes(data_string, 'utf-8')
def to_bytes ( self ) : if not self . _credential : return b'' data_string = json . dumps ( self . _credential ) return bytes ( data_string , 'utf-8' )