mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
use SecureRandom instead of Random
This commit is contained in:
parent
540dd185d5
commit
f3f22e803a
1 changed files with 2 additions and 2 deletions
|
|
@ -18,9 +18,9 @@
|
|||
package org.apache.zeppelin.notebook.utility;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.security.SecureRandom;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
/**
|
||||
* Generate Tiny ID.
|
||||
|
|
@ -71,6 +71,6 @@ public class IdHashes {
|
|||
}
|
||||
|
||||
public static String generateId() {
|
||||
return encode(System.currentTimeMillis() + new Random().nextInt());
|
||||
return encode(System.currentTimeMillis() + new SecureRandom().nextInt());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue