You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.
There is a bug in Sha512Random.split(1) exposed by the following test.
@Test funsplit_One() {
val k1 =RandomKey()
val k2 = k1.split(1)[0];
val k3 = k2.split(1)[0];
}
The bug is in these lines:
overridefunsplit(n:Int): List<Sha512Random> {
if (hasBeenUsed &&!permitsReuse)
throwIllegalStateException("RandomKey instance has already been used.")
hasBeenUsed =true// No need to split if n==1if (n ==1) returnlistOf(this)
The code invalidates this and then returns it as if it is valid.
The text was updated successfully, but these errors were encountered:
There is a bug in
Sha512Random.split(1)
exposed by the following test.The bug is in these lines:
The code invalidates
this
and then returns it as if it is valid.The text was updated successfully, but these errors were encountered: