mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-05-15 12:56:28 +08:00
Support DLL in MSVC
This commit is contained in:
@@ -77,6 +77,26 @@ const SM9_TWIST_POINT _SM9_Ppubs = {
|
||||
const SM9_TWIST_POINT *SM9_Ppubs = &_SM9_Ppubs;
|
||||
|
||||
|
||||
void sm9_bn_set_zero(sm9_bn_t r)
|
||||
{
|
||||
sm9_bn_copy(r, SM9_ZERO);
|
||||
}
|
||||
|
||||
void sm9_bn_set_one(sm9_bn_t r)
|
||||
{
|
||||
sm9_bn_copy(r, SM9_ONE);
|
||||
}
|
||||
|
||||
int sm9_bn_is_zero(const sm9_bn_t a)
|
||||
{
|
||||
return (sm9_bn_cmp(a, SM9_ZERO) == 0);
|
||||
}
|
||||
|
||||
int sm9_bn_is_one(const sm9_bn_t a)
|
||||
{
|
||||
return (sm9_bn_cmp(a, SM9_ONE) == 0);
|
||||
}
|
||||
|
||||
void sm9_bn_to_bytes(const sm9_bn_t a, uint8_t out[32])
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -23,6 +23,9 @@
|
||||
#include <gmssl/error.h>
|
||||
|
||||
|
||||
extern const sm9_bn_t SM9_ZERO;
|
||||
extern const sm9_bn_t SM9_N;
|
||||
|
||||
// generate h1 in [1, n-1]
|
||||
int sm9_hash1(sm9_bn_t h1, const char *id, size_t idlen, uint8_t hid)
|
||||
{
|
||||
|
||||
@@ -18,6 +18,9 @@
|
||||
#include <gmssl/asn1.h>
|
||||
#include <gmssl/error.h>
|
||||
|
||||
|
||||
extern const sm9_bn_t SM9_ZERO;
|
||||
extern const sm9_bn_t SM9_N;
|
||||
extern const SM9_POINT *SM9_P1;
|
||||
extern const SM9_TWIST_POINT *SM9_P2;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user