private function decryptSymmetricKey($entity)
    {
        $decryptedKey = null;

        $encryptionMode = $this->getEncryptionMode($entity);
        switch ($encryptionMode) {
            case EncryptionService::MODE_PER_USER_SHAREABLE:
                $decryptedKey = $this->decryptSymmetricKeyWithUserKey($entity);
                break;
            case EncryptionService::MODE_SYSTEM_ENCRYPTION:
                $decryptedKey = $this->decryptSymmetricKeyWithSystemKey($entity);
                break;
            default:
                throw new EncryptionException(sprintf('Encryption mode %s not supported.', $encryptionMode));
        }

        return $decryptedKey;
    }