Skip to content

Instantly share code, notes, and snippets.

typedef void (*HammingDistanceCallback)(uint8_t* Buf);
template <size_t NumBytes, size_t Distance>
static void HammingDistanceRecurse(uint8_t Buf[NumBytes], HammingDistanceCallback Callback, int Level, int StartPosition)
{
Callback(Buf);
if (Level == Distance)
return;
#include <utility>
template <typename T, typename U>
T RandomChoice_Recursive(unsigned choice, unsigned i, U a)
{
return a;
}
template <typename T, typename U, typename... TArgs>
T RandomChoice_Recursive(unsigned choice, unsigned i, U a, TArgs... tail)
/*
Scramble/descramble raw NAND dumps from the NES Classic.
plutoo 2016
Cheers to brizzo, derrek.
*/
#include <stdio.h>
#include <string.h>
#include <stdint.h>