Skip to content

Commit d393c3e

Browse files
author
Bridger Voss
committed
old wc naming convention fixes
1 parent 3658b76 commit d393c3e

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

crypto/3des/3des-file-encrypt.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
/*
3535
* Makes a cryptographically secure key by stretching a user entered key
3636
*/
37-
int GenerateKey(RNG* rng, byte* key, int size, byte* salt, int pad)
37+
int GenerateKey(WC_RNG* rng, byte* key, int size, byte* salt, int pad)
3838
{
3939
int ret;
4040

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

4848
/* stretches key */
4949
ret = wc_PBKDF2(key, key, strlen((const char*)key), salt, SALT_SIZE, 4096,
50-
size, SHA256);
50+
size, WC_SHA256);
5151
if (ret != 0)
5252
return -1030;
5353

@@ -59,7 +59,7 @@ int GenerateKey(RNG* rng, byte* key, int size, byte* salt, int pad)
5959
*/
6060
int Des3Encrypt(Des3* des3, byte* key, int size, FILE* inFile, FILE* outFile)
6161
{
62-
RNG rng;
62+
WC_RNG rng;
6363
byte iv[DES3_BLOCK_SIZE];
6464
byte* input;
6565
byte* output;
@@ -145,7 +145,7 @@ int Des3Encrypt(Des3* des3, byte* key, int size, FILE* inFile, FILE* outFile)
145145
*/
146146
int Des3Decrypt(Des3* des3, byte* key, int size, FILE* inFile, FILE* outFile)
147147
{
148-
RNG rng;
148+
WC_RNG rng;
149149
byte iv[DES3_BLOCK_SIZE];
150150
byte* input;
151151
byte* output;
@@ -183,7 +183,7 @@ int Des3Decrypt(Des3* des3, byte* key, int size, FILE* inFile, FILE* outFile)
183183

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

crypto/camellia/camellia-encrypt.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
/*
3434
* Makes a cryptographically secure key by stretching a user entered key
3535
*/
36-
int GenerateKey(RNG* rng, byte* key, int size, byte* salt, int pad)
36+
int GenerateKey(WC_RNG* rng, byte* key, int size, byte* salt, int pad)
3737
{
3838
int ret;
3939

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

4747
/* stretches key */
4848
ret = wc_PBKDF2(key, key, strlen((const char*)key), salt, SALT_SIZE, 4096,
49-
size, SHA256);
49+
size, WC_SHA256);
5050
if (ret != 0)
5151
return -1030;
5252

@@ -59,7 +59,7 @@ int GenerateKey(RNG* rng, byte* key, int size, byte* salt, int pad)
5959
int CamelliaEncrypt(Camellia* cam, byte* key, int size, FILE* inFile,
6060
FILE* outFile)
6161
{
62-
RNG rng;
62+
WC_RNG rng;
6363
byte iv[CAMELLIA_BLOCK_SIZE];
6464
byte* input;
6565
byte* output;
@@ -144,7 +144,7 @@ int CamelliaEncrypt(Camellia* cam, byte* key, int size, FILE* inFile,
144144
int CamelliaDecrypt(Camellia* cam, byte* key, int size, FILE* inFile,
145145
FILE* outFile)
146146
{
147-
RNG rng;
147+
WC_RNG rng;
148148
byte iv[CAMELLIA_BLOCK_SIZE];
149149
byte* input;
150150
byte* output;
@@ -182,7 +182,7 @@ int CamelliaDecrypt(Camellia* cam, byte* key, int size, FILE* inFile,
182182

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

signature/rsa_buffer/sign.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ void print_buffer(char* name, unsigned char* data, word32 len)
7474
int main(int argc, char* argv[])
7575
{
7676
int ret = 0;
77-
Sha256 sha256;
78-
Sha256* pSha256 = NULL;
77+
wc_Sha256 sha256;
78+
wc_Sha256* pSha256 = NULL;
7979
RsaKey rsaKey;
8080
RsaKey* pRsaKey = NULL;
8181
#ifdef WC_RSA_BLINDING

signature/rsa_buffer/verify.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@
4747
int main(int argc, char* argv[])
4848
{
4949
int ret = 0;
50-
Sha256 sha256;
51-
Sha256* pSha256 = NULL;
50+
wc_Sha256 sha256;
51+
wc_Sha256* pSha256 = NULL;
5252
RsaKey rsaKey;
5353
RsaKey* pRsaKey = NULL;
5454
word32 idx;

signature/rsa_vfy_only/verify.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ unsigned char rsa_sig_2048[] = {
117117
int main(int argc, char* argv[])
118118
{
119119
int ret = 0;
120-
Sha256 sha256;
121-
Sha256* pSha256 = NULL;
120+
wc_Sha256 sha256;
121+
wc_Sha256* pSha256 = NULL;
122122
RsaKey rsaKey;
123123
RsaKey* pRsaKey = NULL;
124124
unsigned char* decSig = NULL;

0 commit comments

Comments
 (0)