protected static function loadKeyFile(string $filePath): HiddenString
    {
        $fileData = \file_get_contents($filePath);
        if ($fileData === false) {
            // @codeCoverageIgnoreStart
            throw new CannotPerformOperation(
                'Cannot load key from file: '. $filePath
            );
            // @codeCoverageIgnoreEnd
        }
        $data = Hex::decode($fileData);
        \sodium_memzero($fileData);
        return new HiddenString(
            self::getKeyDataFromString($data)
        );
    }