Encrypting 32 byte string in EEPROM.

I have some code that generates a random 32 byte number using the entropy library, and stores it to the EEPROM on the arduino

#include "Entropy.h"
#include "EEPROM.h"
int bitcount = 0;
int hexcount;
String privHex;
int privBin;
int address = 0;

void setup()
{
 Serial.begin(9600);
 Entropy.initialize();
 while(bitcount < 256)
 {
   hexcount = 0;
   while(hexcount < 3)
   {
    privBin += (Entropy.random(2));
    hexcount = hexcount + 1;
   }
   privHex += String(privBin, HEX);
   bitcount = bitcount + 7;
   EEPROM.write(address, privBin);
   address = address + 1;
   
 }
}

void loop()
{
  
}

I was wondering how I could possibly password protect the hex string before storing it on the EEPROM. Thanks

jujugoboom: I was wondering how I could possibly password protect the hex string before storing it on the EEPROM. Thanks

I'm sorry, but what do you mean by that? You want to require a password before the number gets stored? Or you want a password to get it out? Either way, it's just more code on the writing or reading end. There's nothing you can do to the EEPROM or the number itself to make it any more secure. The only thing you have control over is how your progrm reads or writes it. If someone were to load different code onto the board they would be able to read out the number from the EEPROM.