I needed an replacement for the EEPROM library on Arduni Due since it does not have EEPROM at all. Flash memory can be used in a similar so I created a library with the idea to have a similar syntax as the EEPROM library. More info at http://sebastiannilsson.com/en/blogg/ersattare-for-eeprom-pa-arduino-due/
and code at https://github.com/sebnil/DueFlashStorage
// write the value 123 to address 0
// read byte at address 0
byte b = dueFlashStorage.read(0);
Perhaphs it will be useful for someone else.