mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 18:48:13 -07:00
make style
This commit is contained in:
parent
6436f88fb2
commit
2d2b128754
2 changed files with 107 additions and 107 deletions
|
@ -103,20 +103,20 @@ int sha256hash(uint8_t *input, int length, uint8_t *hash) {
|
|||
mbedtls_sha256_update(&sctx, input, length);
|
||||
mbedtls_sha256_finish(&sctx, hash);
|
||||
mbedtls_sha256_free(&sctx);
|
||||
|
||||
return 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int sha512hash(uint8_t *input, int length, uint8_t *hash) {
|
||||
if (!hash || !input)
|
||||
return 1;
|
||||
|
||||
mbedtls_sha512_context sctx;
|
||||
mbedtls_sha512_init(&sctx);
|
||||
mbedtls_sha512_starts(&sctx, 0); //SHA-512, not 384
|
||||
mbedtls_sha512_update(&sctx, input, length);
|
||||
mbedtls_sha512_finish(&sctx, hash);
|
||||
mbedtls_sha512_free(&sctx);
|
||||
if (!hash || !input)
|
||||
return 1;
|
||||
|
||||
mbedtls_sha512_context sctx;
|
||||
mbedtls_sha512_init(&sctx);
|
||||
mbedtls_sha512_starts(&sctx, 0); //SHA-512, not 384
|
||||
mbedtls_sha512_update(&sctx, input, length);
|
||||
mbedtls_sha512_finish(&sctx, hash);
|
||||
mbedtls_sha512_free(&sctx);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue