We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent de4f189 commit 8203bd0Copy full SHA for 8203bd0
src/com/redomar/game/lib/HashGen.java
@@ -8,12 +8,18 @@ public class HashGen {
8
private boolean prefix;
9
private int hexLength;
10
11
+ /**
12
+ * Use for generating a hex Hash. Requires two parameters;
13
+ * @param showPrefix to show 0x prefix.
14
+ * @param length Length of hash.
15
+ */
16
public HashGen(boolean showPrefix, int length){
17
this.prefix = showPrefix;
18
this.hexLength = length;
19
init();
20
}
21
22
+ //Remove null char or prepend 0x
23
private void init(){
24
if(prefix){
25
hexHash = "0x";
@@ -22,6 +28,10 @@ private void init(){
28
29
30
31
32
+ * Retrieve hash
33
+ * @return String containing hash
34
35
public String getHash(){
26
36
setHash(hexLength);
27
37
return hexHash;
0 commit comments