ObjFW  Check-in [f8f3bc1545]

Overview
Comment:Adjust Amiga library to new of_{pbkdf2,scrypt} API
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | amiga-library
Files: files | file ages | folders
SHA3-256: f8f3bc15455082b79cc3e59aabbfd08cd276fc9220c7fa8928253d5e5ba30a37
User & Date: js on 2020-06-21 22:26:15
Other Links: branch diff | manifest | tags
Context
2020-06-21
22:46
Add missing of_log to linklib check-in: 08606a8804 user: js tags: amiga-library
22:26
Adjust Amiga library to new of_{pbkdf2,scrypt} API check-in: f8f3bc1545 user: js tags: amiga-library
22:15
Merge trunk into branch "amiga-library" check-in: 39641794dd user: js tags: amiga-library
Changes

Modified src/amiga-glue.m from [93e24e60c7] to [77817a66d6].

225
226
227
228
229
230
231
232

233
234
235
236
237
238
239
240
241

242
243
244
245
246
247

248
249
250
251
252
253
254
255
225
226
227
228
229
230
231

232



233





234




235

236

237
238
239
240
241
242
243







-
+
-
-
-

-
-
-
-
-
+
-
-
-
-

-
+
-







	M68K_ARG(uint16_t, tag, d0)
	M68K_ARG(uint16_t *, size, a1)

	return of_zip_archive_entry_extra_field_find(extraField, tag, size);
}

void __saveds
glue_of_pbkdf2 PPC_PARAMS(OFHMAC *HMAC, size_t iterations,
glue_of_pbkdf2 PPC_PARAMS(const of_pbkdf2_parameters_t *param)
    const unsigned char *salt, size_t saltLength, const char *password,
    size_t passwordLength, unsigned char *key, size_t keyLength,
    bool allowsSwappableMemory)
{
	M68K_ARG(OFHMAC *, HMAC, a0)
	M68K_ARG(size_t, iterations, d0)
	M68K_ARG(const unsigned char *, salt, a1)
	M68K_ARG(size_t, saltLength, d1)
	M68K_ARG(const char *, password, a2)
	M68K_ARG(const of_pbkdf2_parameters_t *, param, a0)
	M68K_ARG(size_t, passwordLength, d2)
	M68K_ARG(unsigned char *, key, a3)
	M68K_ARG(size_t, keyLength, d3)
	M68K_ARG(bool, allowsSwappableMemory, d4)

	of_pbkdf2(HMAC, iterations, salt, saltLength, password, passwordLength,
	of_pbkdf2(*param);
	    key, keyLength, allowsSwappableMemory);
}

void __saveds
glue_of_salsa20_8_core PPC_PARAMS(uint32_t *buffer)
{
	M68K_ARG(uint32_t *, buffer, a0)

276
277
278
279
280
281
282
283

284
285
286
287
288
289
290
291
292
293

294
295
296
297
298
299

300
301
302
303
304
305
306
307
264
265
266
267
268
269
270

271



272






273




274

275

276
277
278
279
280
281
282







-
+
-
-
-

-
-
-
-
-
-
+
-
-
-
-

-
+
-







	M68K_ARG(size_t, costFactor, d1)
	M68K_ARG(uint32_t *, tmp, a1)

	of_scrypt_romix(buffer, blockSize, costFactor, tmp);
}

void __saveds
glue_of_scrypt PPC_PARAMS(size_t blockSize, size_t costFactor,
glue_of_scrypt PPC_PARAMS(const of_scrypt_parameters_t *param)
    size_t parallelization, const unsigned char *salt, size_t saltLength,
    const char *password, size_t passwordLength, unsigned char *key,
    size_t keyLength, bool allowsSwappableMemory)
{
	M68K_ARG(size_t, blockSize, d0)
	M68K_ARG(size_t, costFactor, d1)
	M68K_ARG(size_t, parallelization, d2)
	M68K_ARG(const unsigned char *, salt, a0)
	M68K_ARG(size_t, saltLength, d3)
	M68K_ARG(const char *, password, a1)
	M68K_ARG(const of_scrypt_parameters_t *, param, a0)
	M68K_ARG(size_t, passwordLength, d4)
	M68K_ARG(unsigned char *, key, a2)
	M68K_ARG(size_t, keyLength, d5)
	M68K_ARG(bool, allowsSwappableMemory, d6)

	of_scrypt(blockSize, costFactor, parallelization, salt, saltLength,
	of_scrypt(*param);
	    password, passwordLength, key, keyLength, allowsSwappableMemory);
}

const char *__saveds
glue_of_strptime PPC_PARAMS(const char *buf, const char *fmt, struct tm *tm,
    int16_t *tz)
{
	M68K_ARG(const char *, buf, a0)

Modified src/amigaos3.sfd from [f505beb2f6] to [8f1f5f4c6b].

21
22
23
24
25
26
27
28

29
30
31
32

33
34
35
36
37
38
39
21
22
23
24
25
26
27

28
29
30
31

32
33
34
35
36
37
38
39







-
+



-
+







size_t glue_of_string_utf8_encode(of_unichar_t c, char *UTF8)(d0,a0)
ssize_t glue_of_string_utf8_decode(const char *UTF8, size_t len, of_unichar_t *c)(a0,d0,a1)
size_t glue_of_string_utf16_length(const of_char16_t *string)(a0)
size_t glue_of_string_utf32_length(const of_char32_t *string)(a0)
OFString *_Nonnull glue_of_zip_archive_entry_version_to_string(uint16_t version)(d0)
OFString *_Nonnull glue_of_zip_archive_entry_compression_method_to_string(uint16_t compressionMethod)(d0)
size_t glue_of_zip_archive_entry_extra_field_find(OFData *extraField, uint16_t tag, uint16_t *size)(a0,d0,a1)
void glue_of_pbkdf2(OFHMAC *HMAC, size_t iterations, const unsigned char *salt, size_t saltLength, const char *password, size_t passwordLength, unsigned char *key, size_t keyLength, bool allowsSwappableMemory)(a0,d0,a1,d1,a2,d2,a3,d3,d4)
void glue_of_pbkdf2(const of_pbkdf2_parameters_t *param)(a0)
void glue_of_salsa20_8_core(uint32_t *_Nonnull buffer)(a0)
void glue_of_scrypt_block_mix(uint32_t *_Nonnull output, const uint32_t *_Nonnull input, size_t blockSize)(a0,a1,d0)
void glue_of_scrypt_romix(uint32_t *buffer, size_t blockSize, size_t costFactor, uint32_t *tmp)(a0,d0,d1,a1)
void glue_of_scrypt(size_t blockSize, size_t costFactor, size_t parallelization, const unsigned char *salt, size_t saltLength, const char *password, size_t passwordLength, unsigned char *key, size_t keyLength, bool allowsSwappableMemory)(d0,d1,d2,a0,d3,a1,d4,a2,d5,d6)
void glue_of_scrypt(const of_scrypt_parameters_t *param)(a0)
const char *_Nullable glue_of_strptime(const char *buf, const char *fmt, struct tm *tm, int16_t *_Nullable tz)(a0,a1,a2,a3)
void glue_of_socket_address_parse_ip(of_socket_address_t *_Nonnull address, OFString *IP, uint16_t port)(a0,a1,d0)
void glue_of_socket_address_parse_ipv4(of_socket_address_t *_Nonnull address, OFString *IP, uint16_t port)(a0,a1,d0)
void glue_of_socket_address_parse_ipv6(of_socket_address_t *_Nonnull address, OFString *IP, uint16_t port)(a0,a1,d0)
void glue_of_socket_address_ipx(of_socket_address_t *_Nonnull address, const unsigned char *_Nonnull node, uint32_t network, uint16_t port)(a0,a1,d0,d1)
bool glue_of_socket_address_equal(const of_socket_address_t *_Nonnull address1, const of_socket_address_t *_Nonnull address2)(a0,a1)
uint32_t glue_of_socket_address_hash(const of_socket_address_t *_Nonnull address)(a0)

Modified src/linklib/linklib.m from [3deba01f01] to [3aa1c94d52].

490
491
492
493
494
495
496
497

498
499
500
501

502
503
504
505
506
507
508
509
490
491
492
493
494
495
496

497


498

499

500
501
502
503
504
505
506







-
+
-
-

-
+
-







    uint16_t *size)
{
	return glue_of_zip_archive_entry_extra_field_find(
	    extraField, tag, size);
}

void
of_pbkdf2(OFHMAC *HMAC, size_t iterations, const unsigned char *salt,
of_pbkdf2(of_pbkdf2_parameters_t param)
    size_t saltLength, const char *password, size_t passwordLength,
    unsigned char *key, size_t keyLength, bool allowsSwappableMemory)
{
	glue_of_pbkdf2(HMAC, iterations, salt, saltLength,
	glue_of_pbkdf2(&param);
	    password, passwordLength, key, keyLength, allowsSwappableMemory);
}

void
of_salsa20_8_core(uint32_t *buffer)
{
	glue_of_salsa20_8_core(buffer);
}
518
519
520
521
522
523
524
525

526
527
528
529
530

531
532
533
534
535
536
537
538
515
516
517
518
519
520
521

522



523

524

525
526
527
528
529
530
531







-
+
-
-
-

-
+
-







of_scrypt_romix(uint32_t *buffer, size_t blockSize, size_t costFactor,
    uint32_t *tmp)
{
	glue_of_scrypt_romix(buffer, blockSize, costFactor, tmp);
}

void
of_scrypt(size_t blockSize, size_t costFactor, size_t parallelization,
of_scrypt(of_scrypt_parameters_t param)
    const unsigned char *salt, size_t saltLength, const char *password,
    size_t passwordLength, unsigned char *key, size_t keyLength,
    bool allowsSwappableMemory)
{
	glue_of_scrypt(blockSize, costFactor, parallelization, salt, saltLength,
	glue_of_scrypt(&param);
	    password, passwordLength, key, keyLength, allowsSwappableMemory);
}

const char *
of_strptime(const char *buf, const char *fmt, struct tm *tm, int16_t *tz)
{
	return glue_of_strptime(buf, fmt, tm, tz);
}