Skip to content

Commit

Permalink
Use same speed test data size
Browse files Browse the repository at this point in the history
  • Loading branch information
guanzhi committed Jun 5, 2024
1 parent 2b09618 commit 6f5cfa6
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tools/sdftest.c
Original file line number Diff line number Diff line change
Expand Up @@ -1195,7 +1195,7 @@ static int test_SDF_InternalSign_ECC(int key, char *pass)
unsigned char *ucPassword = (unsigned char *)pass;
unsigned int uiPwdLength = (unsigned int)strlen(pass);
unsigned char ucData[32] = { 1,2,3,4 };
unsigned int uiDataLength = 32;
unsigned int uiDataLength = (unsigned int)sizeof(ucData);
ECCSignature eccSignature;
int ret;

Expand Down Expand Up @@ -1549,8 +1549,8 @@ static int speed_SDF_InternalSign_ECC(int key, char *pass)
unsigned int uiIPKIndex = (unsigned int)key;
unsigned char *ucPassword = (unsigned char *)pass;
unsigned int uiPwdLength = (unsigned int)strlen(pass);
unsigned char ucData[32] = { 1,2,3,4 };
unsigned int uiDataLength = 32;
unsigned char ucData[64 - 32 - 8] = {1}; // same length as sm2_signtest.c
unsigned int uiDataLength = (unsigned int)sizeof(ucData);
ECCSignature eccSignature;
clock_t begin, end;
double seconds;
Expand Down Expand Up @@ -1609,8 +1609,8 @@ static int speed_SDF_InternalVerify_ECC(int key, char *pass)
unsigned int uiIPKIndex = (unsigned int)key;
unsigned char *ucPassword = (unsigned char *)pass;
unsigned int uiPwdLength = (unsigned int)strlen(pass);
unsigned char ucData[32] = { 1,2,3,4 };
unsigned int uiDataLength = 32;
unsigned char ucData[64 - 32 - 8] = {1}; // same length as sm2_signtest.c
unsigned int uiDataLength = (unsigned int)sizeof(ucData);
ECCSignature eccSignature;
clock_t begin, end;
double seconds;
Expand Down Expand Up @@ -1676,7 +1676,7 @@ static int speed_SDF_InternalEncrypt_ECC(int key)
void *hDeviceHandle = NULL;
void *hSessionHandle = NULL;
unsigned int uiIPKIndex = (unsigned int)key;
unsigned char ucData[48] = { 1,2,3,4 };
unsigned char ucData[32] = {1}; // same as sm2_enctest.c
unsigned int uiDataLength = (unsigned int)sizeof(ucData);
ECCCipher eccCipher;
unsigned char ucDecData[256];
Expand Down Expand Up @@ -1728,7 +1728,7 @@ static int speed_SDF_InternalDecrypt_ECC(int key, char *pass)
unsigned int uiIPKIndex = (unsigned int)key;
unsigned char *ucPassword = (unsigned char *)pass;
unsigned int uiPwdLength = (unsigned int)strlen(pass);
unsigned char ucData[48] = { 1,2,3,4 };
unsigned char ucData[32] = {1}; // same as sm2_enctest.c
unsigned int uiDataLength = (unsigned int)sizeof(ucData);
ECCCipher eccCipher;
unsigned char ucDecData[256];
Expand Down

0 comments on commit 6f5cfa6

Please sign in to comment.