mirror of
https://github.com/jedisct1/libsodium.git
synced 2024-12-19 10:05:05 -07:00
Export constants
This commit is contained in:
parent
1e06b32f45
commit
3d8889560e
@ -65,3 +65,15 @@ crypto_core_ed25519_from_uniform(unsigned char *p, const unsigned char *r)
|
||||
|
||||
return - ge25519_has_small_order(p);
|
||||
}
|
||||
|
||||
size_t
|
||||
crypto_core_ed25519_bytes(void)
|
||||
{
|
||||
return crypto_core_ed25519_BYTES;
|
||||
}
|
||||
|
||||
size_t
|
||||
crypto_core_ed25519_uniformbytes(void)
|
||||
{
|
||||
return crypto_core_ed25519_UNIFORMBYTES;
|
||||
}
|
||||
|
@ -9,7 +9,12 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#define crypto_core_ed25519_BYTES 32
|
||||
SODIUM_EXPORT
|
||||
size_t crypto_core_ed25519_bytes(void);
|
||||
|
||||
#define crypto_core_ed25519_UNIFORMBYTES 32
|
||||
SODIUM_EXPORT
|
||||
size_t crypto_core_ed25519_uniformbytes(void);
|
||||
|
||||
SODIUM_EXPORT
|
||||
int crypto_core_ed25519_is_valid_point(const unsigned char *p);
|
||||
|
@ -103,6 +103,9 @@ main(void)
|
||||
sodium_free(p);
|
||||
sodium_free(h);
|
||||
|
||||
assert(crypto_core_ed25519_BYTES == crypto_core_ed25519_bytes());
|
||||
assert(crypto_core_ed25519_UNIFORMBYTES == crypto_core_ed25519_uniformbytes());
|
||||
|
||||
printf("OK\n");
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user