mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-05-13 03:46:26 +08:00
Update sdftest.c
This commit is contained in:
@@ -109,7 +109,8 @@ static int test_SDF_GenerateRandom(void)
|
|||||||
{
|
{
|
||||||
void *hDeviceHandle = NULL;
|
void *hDeviceHandle = NULL;
|
||||||
void *hSessionHandle = NULL;
|
void *hSessionHandle = NULL;
|
||||||
int ret;
|
int lengths[] = { 1, 8, 128 };
|
||||||
|
int ret, i;
|
||||||
|
|
||||||
ret = SDF_OpenDevice(&hDeviceHandle);
|
ret = SDF_OpenDevice(&hDeviceHandle);
|
||||||
if (ret != SDR_OK) {
|
if (ret != SDR_OK) {
|
||||||
@@ -123,8 +124,7 @@ static int test_SDF_GenerateRandom(void)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int lengths[] = { 1, 8, 128 };
|
for (i = 0; i < sizeof(lengths) / sizeof(lengths[0]); i++) {
|
||||||
for (int i = 0; i < sizeof(lengths) / sizeof(lengths[0]); i++) {
|
|
||||||
unsigned int uiLength = lengths[i];
|
unsigned int uiLength = lengths[i];
|
||||||
unsigned char pucRandom[128] = {0}; // Assuming max length
|
unsigned char pucRandom[128] = {0}; // Assuming max length
|
||||||
unsigned char zeros[sizeof(pucRandom)] = {0};
|
unsigned char zeros[sizeof(pucRandom)] = {0};
|
||||||
|
|||||||
Reference in New Issue
Block a user