Skip to content

Commit 0fd01c0

Browse files
committed
sha256: rename oneshot to sha256
1 parent 447f945 commit 0fd01c0

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

examples/sha256/sha256.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ void setup() {
2525
Serial.println(hexEncode(sha, sizeof(sha)));
2626

2727
/* One-shot */
28-
arduino::sha256::oneshot(buffer, sizeof(buffer), sha);
28+
arduino::sha256::sha256(buffer, sizeof(buffer), sha);
2929
Serial.println(hexEncode(sha, sizeof(sha)));
3030
}
3131

src/bpid/bpid.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ namespace arduino { namespace bpid {
3939
return String("");
4040
}
4141
uint8_t out[SHA256::HASH_SIZE];
42-
arduino::sha256::oneshot(data, sizeof(data), out);
42+
arduino::sha256::sha256(data, sizeof(data), out);
4343
return arduino::hex::encode(out, sizeof(out));
4444
}
4545

src/sha256/SHA256.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ namespace arduino { namespace sha256 {
3838
inline void finalize(sha256_ctx * ctx, uint8_t digest[SHA256_DIGEST_SIZE]) {
3939
return sha256_final(ctx, digest);
4040
}
41-
inline void oneshot(const unsigned char *input, unsigned int ilen, unsigned char *output) {
41+
inline void sha256(const unsigned char *input, unsigned int ilen, unsigned char *output) {
4242
::sha256(input, ilen, output);
4343
}
4444

0 commit comments

Comments
 (0)