mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-01 03:34:39 +02:00
make it easier for user to define custom bigint types
This commit is contained in:
@@ -77,6 +77,10 @@ extern "C" {
|
||||
#undef MP_64BIT
|
||||
#endif
|
||||
|
||||
|
||||
/* allow user to define on mp_digit, mp_word, DIGIT_BIT types */
|
||||
#ifndef WOLFSSL_BIGINT_TYPES
|
||||
|
||||
/* some default configurations.
|
||||
*
|
||||
* A "mp_digit" must be able to hold DIGIT_BIT + 1 bits
|
||||
@@ -119,6 +123,7 @@ extern "C" {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* WOLFSSL_BIGINT_TYPES */
|
||||
|
||||
/* otherwise the bits per digit is calculated automatically from the size of
|
||||
a mp_digit */
|
||||
|
@@ -202,6 +202,9 @@
|
||||
#endif
|
||||
|
||||
|
||||
/* allow user to define on fp_digit, fp_word types */
|
||||
#ifndef WOLFSSL_BIGINT_TYPES
|
||||
|
||||
/* some default configurations.
|
||||
*/
|
||||
#if defined(FP_64BIT)
|
||||
@@ -227,6 +230,8 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* WOLFSSL_BIGINT_TYPES */
|
||||
|
||||
/* # of digits this is */
|
||||
#define DIGIT_BIT (int)((CHAR_BIT) * sizeof(fp_digit))
|
||||
|
||||
|
Reference in New Issue
Block a user