Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BCryptGenRandom flags #1523

Closed
ChrisDenton opened this issue Apr 5, 2023 · 0 comments
Closed

BCryptGenRandom flags #1523

ChrisDenton opened this issue Apr 5, 2023 · 0 comments
Assignees

Comments

@ChrisDenton
Copy link
Contributor

The dwflags of BCryptGenRandom can be either BCRYPT_RNG_USE_ENTROPY_IN_BUFFER or BCRYPT_USE_SYSTEM_PREFERRED_RNG. It would be nice if this was represented by a type.

Current definitions:

// Windows.Win32.Security.Cryptography.Apis
public unsafe static extern NTSTATUS BCryptGenRandom(
    [Optional][In] BCRYPT_ALG_HANDLE hAlgorithm,
    [Out][MemorySize(BytesParamIndex = 2)] byte* pbBuffer,
    [In] uint cbBuffer,
    [In] uint dwFlags
);
public const uint BCRYPT_RNG_USE_ENTROPY_IN_BUFFER = 1u;
public const uint BCRYPT_USE_SYSTEM_PREFERRED_RNG = 2u;
@mikebattista mikebattista self-assigned this Apr 5, 2023
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

No branches or pull requests

2 participants