Skip to content

Commit 08a5edf

Browse files
committed
bip38: avoid a cpp keyword in parameter names
1 parent aeef40d commit 08a5edf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/bip38.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,14 +123,14 @@ static int address_from_private_key(const unsigned char *bytes,
123123
return ret;
124124
}
125125

126-
static void aes_enc_impl(const unsigned char *src, const unsigned char *xor,
126+
static void aes_enc_impl(const unsigned char *src, const unsigned char *xor_bytes,
127127
const unsigned char *key, unsigned char *bytes_out)
128128
{
129129
unsigned char plaintext[AES_BLOCK_LEN];
130130
size_t i;
131131

132132
for (i = 0; i < sizeof(plaintext); ++i)
133-
plaintext[i] = src[i] ^ xor[i];
133+
plaintext[i] = src[i] ^ xor_bytes[i];
134134

135135
wally_aes(key, AES_KEY_LEN_256, plaintext, AES_BLOCK_LEN,
136136
AES_FLAG_ENCRYPT, bytes_out, AES_BLOCK_LEN);
@@ -219,7 +219,7 @@ int bip38_from_private_key(const unsigned char *bytes, size_t bytes_len,
219219
}
220220

221221

222-
static void aes_dec_impl(const unsigned char *cyphertext, const unsigned char *xor,
222+
static void aes_dec_impl(const unsigned char *cyphertext, const unsigned char *xor_bytes,
223223
const unsigned char *key, unsigned char *bytes_out)
224224
{
225225
size_t i;
@@ -230,7 +230,7 @@ static void aes_dec_impl(const unsigned char *cyphertext, const unsigned char *x
230230
bytes_out, AES_BLOCK_LEN);
231231

232232
for (i = 0; i < AES_BLOCK_LEN; ++i)
233-
bytes_out[i] ^= xor[i];
233+
bytes_out[i] ^= xor_bytes[i];
234234
}
235235

236236
static int to_private_key(const char *bip38,

0 commit comments

Comments
 (0)