| 1 | <?php |
||
| 17 | class Random |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * Not so secure, but good enough for client transaction ids. |
||
| 21 | * |
||
| 22 | * @param int $max_length |
||
| 23 | * @param string $prefix |
||
| 24 | */ |
||
| 25 | public static function id($max_length = 64, $prefix = '') |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Generate random auth key. |
||
| 37 | * |
||
| 38 | * @todo this should be based on templates according to registry requirements! |
||
| 39 | * |
||
| 40 | * @param int $len |
||
| 41 | * |
||
| 42 | * @return string |
||
| 43 | */ |
||
| 44 | public static function auth($len) |
||
| 62 | } |
||
| 63 |