diff options
author | 2023-06-30 23:30:13 +0200 | |
---|---|---|
committer | 2023-06-30 23:30:13 +0200 | |
commit | 52ab7b76f76ee0464fd150ec881ce50fbf2dc001 (patch) | |
tree | 3b2ee64ea5f8a42ed64c01f59b2fd752b23fd546 /3rd_party/libsrp6a-sha512/t_misc.c | |
parent | f4c30d501eaf5a2c1a386af6a2295dd0029304e9 (diff) | |
download | libimobiledevice-52ab7b76f76ee0464fd150ec881ce50fbf2dc001.tar.gz libimobiledevice-52ab7b76f76ee0464fd150ec881ce50fbf2dc001.tar.bz2 |
3rd_party/libsrp6a-sha512: Update function definitions to modern style
Diffstat (limited to '3rd_party/libsrp6a-sha512/t_misc.c')
-rw-r--r-- | 3rd_party/libsrp6a-sha512/t_misc.c | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/3rd_party/libsrp6a-sha512/t_misc.c b/3rd_party/libsrp6a-sha512/t_misc.c index 3053358..3a2cda1 100644 --- a/3rd_party/libsrp6a-sha512/t_misc.c +++ b/3rd_party/libsrp6a-sha512/t_misc.c | |||
@@ -80,8 +80,7 @@ SHA1_CTX randctxt; | |||
80 | extern char ** environ; | 80 | extern char ** environ; |
81 | 81 | ||
82 | static void | 82 | static void |
83 | t_envhash(out) | 83 | t_envhash(unsigned char * out) |
84 | unsigned char * out; | ||
85 | { | 84 | { |
86 | char ** ptr; | 85 | char ** ptr; |
87 | char ebuf[256]; | 86 | char ebuf[256]; |
@@ -115,8 +114,7 @@ t_envhash(out) | |||
115 | * The entire buffer is run once through SHA to obtain the final result. | 114 | * The entire buffer is run once through SHA to obtain the final result. |
116 | */ | 115 | */ |
117 | static void | 116 | static void |
118 | t_fshash(out) | 117 | t_fshash(unsigned char * out) |
119 | unsigned char * out; | ||
120 | { | 118 | { |
121 | char dotpath[128]; | 119 | char dotpath[128]; |
122 | struct stat st; | 120 | struct stat st; |
@@ -317,9 +315,7 @@ t_stronginitrand() | |||
317 | * Each cycle generates 20 bytes of new output. | 315 | * Each cycle generates 20 bytes of new output. |
318 | */ | 316 | */ |
319 | _TYPE( void ) | 317 | _TYPE( void ) |
320 | t_random(data, size) | 318 | t_random(unsigned char * data, unsigned size) |
321 | unsigned char * data; | ||
322 | unsigned size; | ||
323 | { | 319 | { |
324 | if(!initialized) | 320 | if(!initialized) |
325 | t_initrand(); | 321 | t_initrand(); |
@@ -369,10 +365,7 @@ t_random(data, size) | |||
369 | * single 320-bit value. | 365 | * single 320-bit value. |
370 | */ | 366 | */ |
371 | _TYPE( unsigned char * ) | 367 | _TYPE( unsigned char * ) |
372 | t_sessionkey(key, sk, sklen) | 368 | t_sessionkey(unsigned char * key, unsigned char * sk, unsigned sklen) |
373 | unsigned char * key; | ||
374 | unsigned char * sk; | ||
375 | unsigned sklen; | ||
376 | { | 369 | { |
377 | unsigned i, klen; | 370 | unsigned i, klen; |
378 | unsigned char * hbuf; | 371 | unsigned char * hbuf; |
@@ -411,11 +404,7 @@ t_sessionkey(key, sk, sklen) | |||
411 | } | 404 | } |
412 | 405 | ||
413 | _TYPE( void ) | 406 | _TYPE( void ) |
414 | t_mgf1(mask, masklen, seed, seedlen) | 407 | t_mgf1(unsigned char * mask, unsigned masklen, const unsigned char * seed, unsigned seedlen) |
415 | unsigned char * mask; | ||
416 | unsigned masklen; | ||
417 | const unsigned char * seed; | ||
418 | unsigned seedlen; | ||
419 | { | 408 | { |
420 | SHA1_CTX ctxt; | 409 | SHA1_CTX ctxt; |
421 | unsigned i = 0; | 410 | unsigned i = 0; |