本文介绍了SecureRandom的SHA1PRNG算法对于熵使用/ dev / random吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在javadocs和在线找到这个,但找不到一个确定的答案。 Dan Dyer在

I tried looking for this in the javadocs and online but couldn't find a definitive answer. The answer by Dan Dyer in

似乎建议SHA1PRNG不使用任何系统资源的熵。这是正确的吗?

Seems to suggest SHA1PRNG does not use any system resources for entropy. Is this correct?

推荐答案

不,在默认的Oracle实现中,它使用系统资源,除非你在调用 nextBytes()。从 SecureRandom 的Sun / Oracle文档:

No, in the default Oracle implementation it uses system resources, unless you seed it before calling nextBytes(). From the Sun/Oracle documentation of SecureRandom:

 SecureRandom random = SecureRandom.getInstance("SHA1PRNG");
 random.setSeed(seed);


这篇关于SecureRandom的SHA1PRNG算法对于熵使用/ dev / random吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 14:39