Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#include <Hash.h>
void setup() {
Serial.begin(9600);
Serial.println("Welcome to the glitchtastic adventure!");
}
int g1 = 0;
String data = "A";
void loop() {
String d = sha1(data);
int i = 50;
for(i = 0;i < 2500;i++)
{
d = sha1(d);
}
g1 = 1 - g1;
Serial.printf("%d : SHA1 ROUND 1 : ",g1);
Serial.println(d);
for(i = 0;i < 2500;i++)
{
d = sha1(d);
}
Serial.printf("%d : SHA1 ROUND 2 : ",g1);
Serial.println(d);
for(i = 0;i < 2500;i++)
{
d = sha1(d);
}
Serial.printf("%d : SHA1 ROUND 3 : ",g1);
Serial.println(d);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment