'Actually do the encryption. Runs in a background thread.
data is serialized to bytes with pickle.
bytes are returned.'

def _encrypt(self, data):

    return self.fernet.encrypt(json.dumps(data).encode('utf8'))
