public function set(EntityInterface $entity): string
    {
        $hash = $entity->calculateHash();
        $content = $this->encodeContent($entity->writeData());
        $this->saveContent($hash, $content);
        return $hash;
    }