Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions crypto/3des/3des-file-encrypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
/*
* Makes a cryptographically secure key by stretching a user entered key
*/
int GenerateKey(RNG* rng, byte* key, int size, byte* salt, int pad)
int GenerateKey(WC_RNG* rng, byte* key, int size, byte* salt, int pad)
{
int ret;

Expand All @@ -47,7 +47,7 @@ int GenerateKey(RNG* rng, byte* key, int size, byte* salt, int pad)

/* stretches key */
ret = wc_PBKDF2(key, key, strlen((const char*)key), salt, SALT_SIZE, 4096,
size, SHA256);
size, WC_SHA256);
if (ret != 0)
return -1030;

Expand All @@ -59,7 +59,7 @@ int GenerateKey(RNG* rng, byte* key, int size, byte* salt, int pad)
*/
int Des3Encrypt(Des3* des3, byte* key, int size, FILE* inFile, FILE* outFile)
{
RNG rng;
WC_RNG rng;
byte iv[DES3_BLOCK_SIZE];
byte* input;
byte* output;
Expand Down Expand Up @@ -145,7 +145,7 @@ int Des3Encrypt(Des3* des3, byte* key, int size, FILE* inFile, FILE* outFile)
*/
int Des3Decrypt(Des3* des3, byte* key, int size, FILE* inFile, FILE* outFile)
{
RNG rng;
WC_RNG rng;
byte iv[DES3_BLOCK_SIZE];
byte* input;
byte* output;
Expand Down Expand Up @@ -183,7 +183,7 @@ int Des3Decrypt(Des3* des3, byte* key, int size, FILE* inFile, FILE* outFile)

/* replicates old key if keys match */
ret = wc_PBKDF2(key, key, strlen((const char*)key), salt, SALT_SIZE, 4096,
size, SHA256);
size, WC_SHA256);
if (ret != 0)
return -1050;

Expand Down
10 changes: 5 additions & 5 deletions crypto/camellia/camellia-encrypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
/*
* Makes a cryptographically secure key by stretching a user entered key
*/
int GenerateKey(RNG* rng, byte* key, int size, byte* salt, int pad)
int GenerateKey(WC_RNG* rng, byte* key, int size, byte* salt, int pad)
{
int ret;

Expand All @@ -46,7 +46,7 @@ int GenerateKey(RNG* rng, byte* key, int size, byte* salt, int pad)

/* stretches key */
ret = wc_PBKDF2(key, key, strlen((const char*)key), salt, SALT_SIZE, 4096,
size, SHA256);
size, WC_SHA256);
if (ret != 0)
return -1030;

Expand All @@ -59,7 +59,7 @@ int GenerateKey(RNG* rng, byte* key, int size, byte* salt, int pad)
int CamelliaEncrypt(Camellia* cam, byte* key, int size, FILE* inFile,
FILE* outFile)
{
RNG rng;
WC_RNG rng;
byte iv[CAMELLIA_BLOCK_SIZE];
byte* input;
byte* output;
Expand Down Expand Up @@ -144,7 +144,7 @@ int CamelliaEncrypt(Camellia* cam, byte* key, int size, FILE* inFile,
int CamelliaDecrypt(Camellia* cam, byte* key, int size, FILE* inFile,
FILE* outFile)
{
RNG rng;
WC_RNG rng;
byte iv[CAMELLIA_BLOCK_SIZE];
byte* input;
byte* output;
Expand Down Expand Up @@ -182,7 +182,7 @@ int CamelliaDecrypt(Camellia* cam, byte* key, int size, FILE* inFile,

/* replicates old key if keys match */
ret = wc_PBKDF2(key, key, strlen((const char*)key), salt, SALT_SIZE, 4096,
size, SHA256);
size, WC_SHA256);
if (ret != 0)
return -1050;

Expand Down
4 changes: 2 additions & 2 deletions signature/rsa_buffer/sign.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ void print_buffer(char* name, unsigned char* data, word32 len)
int main(int argc, char* argv[])
{
int ret = 0;
Sha256 sha256;
Sha256* pSha256 = NULL;
wc_Sha256 sha256;
wc_Sha256* pSha256 = NULL;
RsaKey rsaKey;
RsaKey* pRsaKey = NULL;
#ifdef WC_RSA_BLINDING
Expand Down
4 changes: 2 additions & 2 deletions signature/rsa_buffer/verify.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
int main(int argc, char* argv[])
{
int ret = 0;
Sha256 sha256;
Sha256* pSha256 = NULL;
wc_Sha256 sha256;
wc_Sha256* pSha256 = NULL;
RsaKey rsaKey;
RsaKey* pRsaKey = NULL;
word32 idx;
Expand Down
4 changes: 2 additions & 2 deletions signature/rsa_vfy_only/verify.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ unsigned char rsa_sig_2048[] = {
int main(int argc, char* argv[])
{
int ret = 0;
Sha256 sha256;
Sha256* pSha256 = NULL;
wc_Sha256 sha256;
wc_Sha256* pSha256 = NULL;
RsaKey rsaKey;
RsaKey* pRsaKey = NULL;
unsigned char* decSig = NULL;
Expand Down
Loading