mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-19 23:22:16 +03:00
Hash: make actual SHA1 result and comment consistent (#5057)
fixes #3437
This commit is contained in:
parent
18f643c7e2
commit
0da54d88a9
@ -5,13 +5,13 @@
|
||||
#include <Hash.h>
|
||||
|
||||
void setup() {
|
||||
Serial.begin(921600);
|
||||
Serial.begin(115200);
|
||||
}
|
||||
|
||||
void loop() {
|
||||
|
||||
// usage as String
|
||||
// SHA1:a94a8fe5ccb19ba61c4c0873d391e987982fbbd3
|
||||
// SHA1:a9993e364706816aba3e25717850c26c9cd0d89d
|
||||
|
||||
Serial.print("SHA1:");
|
||||
Serial.println(sha1("abc"));
|
||||
@ -19,7 +19,7 @@ void loop() {
|
||||
// usage as ptr
|
||||
// SHA1:a94a8fe5ccb19ba61c4c0873d391e987982fbbd3
|
||||
uint8_t hash[20];
|
||||
sha1("abc", &hash[0]);
|
||||
sha1("test", &hash[0]);
|
||||
|
||||
Serial.print("SHA1:");
|
||||
for (uint16_t i = 0; i < 20; i++) {
|
||||
@ -29,4 +29,3 @@ void loop() {
|
||||
|
||||
delay(1000);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user