-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add remaining functions for looking up constants
The automated script that generated functions for looking up #define'd constants didn't handle edge cases in these files, so these have been added by hand. They're thus either more likely or less likely to contain mistakes (depending on one's particular point of view).
- Loading branch information
Showing
9 changed files
with
100 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
src/libsodium/crypto_generichash/blake2/generichash_blake2_api.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#include "crypto_generichash_blake2b.h" | ||
|
||
size_t | ||
crypto_generichash_blake2b_bytes_min(void) { | ||
return crypto_generichash_blake2b_BYTES_MIN; | ||
} | ||
|
||
size_t | ||
crypto_generichash_blake2b_bytes_max(void) { | ||
return crypto_generichash_blake2b_BYTES_MAX; | ||
} | ||
|
||
size_t | ||
crypto_generichash_blake2b_keybytes_min(void) { | ||
return crypto_generichash_blake2b_KEYBYTES_MIN; | ||
} | ||
|
||
size_t | ||
crypto_generichash_blake2b_keybytes_max(void) { | ||
return crypto_generichash_blake2b_KEYBYTES_MAX; | ||
} | ||
|
||
size_t | ||
crypto_generichash_blake2b_blockbytes(void) { | ||
return crypto_generichash_blake2b_BLOCKBYTES; | ||
} | ||
|
||
const char * | ||
crypto_generichash_blake2b_blockbytes_primitive(void) { | ||
return "blake2b"; | ||
} |
16 changes: 16 additions & 0 deletions
16
src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305_api.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#include "crypto_onetimeauth_poly1305.h" | ||
|
||
size_t | ||
crypto_onetimeauth_poly1305_bytes(void) { | ||
return crypto_onetimeauth_poly1305_BYTES; | ||
} | ||
|
||
size_t | ||
crypto_onetimeauth_poly1305_keybytes(void) { | ||
return crypto_onetimeauth_poly1305_KEYBYTES; | ||
} | ||
|
||
const char * | ||
crypto_onetimeauth_poly1305_primitive(void) { | ||
return "poly1305"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#include "crypto_verify_16.h" | ||
|
||
size_t | ||
crypto_verify_16_bytes(void) { | ||
return crypto_verify_16_BYTES; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#include "crypto_verify_32.h" | ||
|
||
size_t | ||
crypto_verify_32_bytes(void) { | ||
return crypto_verify_32_BYTES; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters