【发布时间】:2016-07-12 14:01:42
【问题描述】:
出于测试目的,我需要将SecureRandom 与自定义算法一起使用。怎么可能?
我想我必须继承 SecureRandom 并提供 SecureRandomSpi 自定义实现:
167: /**
168: A constructor for SecureRandom. It constructs a new
169: SecureRandom using the specified SecureRandomSpi from
170: the specified security provier.
171:
172: @param secureRandomSpi A SecureRandomSpi class
173: @param provider A Provider class
174: */
175: protected SecureRandom(SecureRandomSpi secureRandomSpi, Provider provider)
176: {
177: this(secureRandomSpi, provider, "unknown");
178: }
有没有简单的方法或者任何人都可以提供广告示例?
【问题讨论】:
标签: java random secure-random