Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

XXhash

Featured Replies

  • Author
  • Localization

chrrox, posted Fri Mar 19, 2021 11:01 pm (62938)


I see it mentioned in quickbms but i could not find an example

sample .net code
Code:
using System;
using System.Text;
using System.Security.Cryptography;
using Extensions.Data;
               
public class Program
{
   public static void Main()
   {
      byte[] input = Encoding.ASCII.GetBytes("Portal_QBHN.plist");         // the data to be hashed.
      byte[] result = null;
      using (HashAlgorithm xxhash = XXHash64.Create())
      {
         result = xxhash.ComputeHash(input);               // compute the hash.
      }
      if (result != null)
      {
         Console.WriteLine(BitConverter.ToInt64(result, 0).ToString("x"));
      }
   }
}


input
Quote:
Portal_QBHN.plist

output 0x22d6307b60c66430

How would I convert that to

Code:
\22\d6307b60c66430
  • Author
  • Localization

aluigi, posted Sat Mar 20, 2021 7:06 am (62940)


This is the code for quickbms for calculating xxhash64:
Code:
encryption crc 0 "0 0 0 25 0 1"
set VAR string "Portal_QBHN.plist"
string VAR e VAR
print "%QUICKBMS_CRC|x%"

And the equivalent if the input is a file:
Code:
set MEMORY_FILE binary "Portal_QBHN.plist"
encryption crc 0 "0 0 0 25 0 1"
get SIZE asize MEMORY_FILE
log MEMORY_FILE 0 SIZE MEMORY_FILE
print "%QUICKBMS_CRC|x%"

You need to use quickbms_4gb_files.exe for the work because it's a 64bit crc.

If you want to "dump" that number in a variable use: string VAR = QUICKBMS_CRC
With endian big the result will just be the one you were expecting: "O0{`?d0
Another alternative is using the byte2hex conversion (string or log)
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.