private function encryptSymmetricKeyWithUserKey($clearKey, $entity)
    {
        $users = $this->accessChecker->getAllowedUsers($entity);
        $symmetricKey = new SymmetricKey();

        foreach ($users as $user) {
            $publicKey = $this->getPublicKey($user);
            $encryptedKey = base64_encode($this->cryptographyProvider->encryptWithPublicKey($clearKey, $publicKey));
            $symmetricKey->addKey($user, $encryptedKey);
        }

        return $symmetricKey;
    }