mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 20:24: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
|
#undef MP_64BIT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* allow user to define on mp_digit, mp_word, DIGIT_BIT types */
|
||||||
|
#ifndef WOLFSSL_BIGINT_TYPES
|
||||||
|
|
||||||
/* some default configurations.
|
/* some default configurations.
|
||||||
*
|
*
|
||||||
* A "mp_digit" must be able to hold DIGIT_BIT + 1 bits
|
* A "mp_digit" must be able to hold DIGIT_BIT + 1 bits
|
||||||
@@ -119,6 +123,7 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif /* WOLFSSL_BIGINT_TYPES */
|
||||||
|
|
||||||
/* otherwise the bits per digit is calculated automatically from the size of
|
/* otherwise the bits per digit is calculated automatically from the size of
|
||||||
a mp_digit */
|
a mp_digit */
|
||||||
|
@@ -202,6 +202,9 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* allow user to define on fp_digit, fp_word types */
|
||||||
|
#ifndef WOLFSSL_BIGINT_TYPES
|
||||||
|
|
||||||
/* some default configurations.
|
/* some default configurations.
|
||||||
*/
|
*/
|
||||||
#if defined(FP_64BIT)
|
#if defined(FP_64BIT)
|
||||||
@@ -227,6 +230,8 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif /* WOLFSSL_BIGINT_TYPES */
|
||||||
|
|
||||||
/* # of digits this is */
|
/* # of digits this is */
|
||||||
#define DIGIT_BIT (int)((CHAR_BIT) * sizeof(fp_digit))
|
#define DIGIT_BIT (int)((CHAR_BIT) * sizeof(fp_digit))
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user