File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 15
15
16
16
class TransRef {
17
17
18
+ /**
19
+ * Get the pool to use based on the type of prefix hash
20
+ * @param string $type
21
+ * @return string
22
+ */
18
23
public static function getPool ( $ type = 'alnum ' )
19
24
{
20
25
switch ( $ type ) {
@@ -44,7 +49,12 @@ public static function getPool( $type = 'alnum')
44
49
return $ pool ;
45
50
}
46
51
47
-
52
+ /**
53
+ * Generate a random secure crypt figure
54
+ * @param integer $min
55
+ * @param integer $max
56
+ * @return integer
57
+ */
48
58
public static function secure_crypt ($ min , $ max ) {
49
59
$ range = $ max - $ min ;
50
60
@@ -64,6 +74,11 @@ public static function secure_crypt($min, $max) {
64
74
return $ min + $ rnd ;
65
75
}
66
76
77
+ /**
78
+ * Finally, generate a hashed token
79
+ * @param integer $length
80
+ * @return string
81
+ */
67
82
public static function getHashedToken ($ length = 25 )
68
83
{
69
84
$ token = "" ;
You can’t perform that action at this time.
0 commit comments