Skip to content

Conversation

paperchalice
Copy link
Contributor

Use Cryptography API: Next Generation, because UWP doesn't support old api.
There is a simpler implementation if we don't care about RSA:

BCryptGenRandom(NULL, (PUCHAR)p, (ULONG)n, BCRYPT_USE_SYSTEM_PREFERRED_RNG);

@sjaeckel
Copy link
Member

Thanks for the PR :)

Could you please check how we did the bcrypt integration in ltc and copy that instead?

https://github.com/libtom/libtomcrypt/blob/develop/src/prngs/rng_get_bytes.c

@paperchalice paperchalice changed the title Use bcrypt.h on Windows Support "Cryptography API: Next Generation" on Windows Jan 29, 2025
Copy link
Member

@sjaeckel sjaeckel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look fine!

Can you please squash the two commits and then we're ready to merge.

Thanks again :)

Copy link

@levitte levitte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, looks good to me too

@sjaeckel sjaeckel merged commit a1f1c5f into libtom:develop Jan 30, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants