public function decryptEntityField(EntityInterface $entity, string $field)
    {
        if (!$this->canDecryptField($entity, $field)) {
            return null;
        }

        $encryptionKey = $this->getConfig('encryptionKey');
        $base64 = $this->getConfig('base64');
        $encoded = $entity->get($field);
        if (empty($encoded) || $encoded === false) {
            return null;
        }

        if ($base64 === true) {
            $encoded = base64_decode($encoded, true);
            if ($encoded === false) {
                return null;
            }
        }
        $decrypted = Security::decrypt($encoded, $encryptionKey);
        if ($decrypted === false) {
            throw new RuntimeException("Unable to decypher `{$field}`. Check your enryption key.");
        }

        return $decrypted;
    }