SHA1/SHA256 library for DUE?


I have tried to run the Cryptosuite for the Arduino DUE available from here:

Unfortunately, the library only compiles on UNO and Leonardo devices because it uses the PROGMEM.

Has anybody gotten this library to work? I’m interested in using the library in an Arduino DUE project that connects to a MySQL database directly with Chucks code here:

Does anyone have this working or be willing to help me port this library to DUE?

Is there a guide out there on how to un-PROGMEM a project so it will run on DUE? :slight_smile:
I understand it will take up more memory then on other platforms because we can’t store a couple of the large char array values in EEPROM but I’m willing to try if anyone can help me.

I know this is oldish, but frankly, if I posted my own topic, it would be saying the same thing since I'm in the same boat. So, any ideas on this?

You may have other issues to solve but the newer versions of the libraries eliminate the problems with PROGMEM, I’m not sure exactly when this change was made but with 1.5.2 you had to put something like this where ever pgmspace.h was used:

#ifndef __arm__
#include <avr/pgmspace.h>
#define PROGMEM /* empty */
#define pgm_read_byte(x) (*(x))
#define pgm_read_word(x) (*(x))
#define pgm_read_float(x) (*(x))
#define PSTR(x) x

1.5.4 has a pgmspace.h set up for the Due with a more comprehensive set of macros, I think 1.5.3 did too but I’m not sure.