Windows中的随机密钥生成库 [英] random key generation library in windows

查看:157
本文介绍了Windows中的随机密钥生成库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

默认情况下,是否有Windows提供的任何库(任何版本)都可以在不使用.NET框架的情况下生成随机密钥(RNG).

Is there any library provided by default with windows (any version) which can generate random keys (RNGs) without the use of .NET framework.

推荐答案



CryptGenKey函数 [密码功能 [ ^ ]从Advapi32.dll导出,您可以在OS WINVER> = 5.0
上使用它们
您应该考虑改写您的问题...有几种不同类型的加密密钥.如果您正在寻找一个简单的随机字节序列,那么 CryptGenRandom函数 [ ^ ]可以.如果攻击者知道系统时间/正常运行时间以及其他srand()输入,则rand()函数可能会生成相对可预测的序列.

最好的祝福,
-David Delaune
Hi,

The CryptGenKey function[^] and the other Cryptography Functions[^] are exported from Advapi32.dll and you can use them on OS WINVER >= 5.0

You should consider rephrasing your question... there are several different types of cryptography keys. If you are looking for a simple random sequence of bytes then perhaps the CryptGenRandom function[^] will do. The rand() function supposedly generates a relatively predictable sequence if an attacker knows the system time/uptime and other srand() input.

Best Wishes,
-David Delaune


,如果您搜索生成随机密钥库或函数,则使用#include< stdlib.h>库,您可以使用rand()函数.
ıf you search generate random keys library or function, you use #include <stdlib.h> library and, you can use rand() function.


这篇关于Windows中的随机密钥生成库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆