github.com/lmorg/murex@v0.0.0-20240217211045-e081c89cd4ef/builtins/core/random/rand_doc.yaml (about) 1 - DocumentID: rand 2 Title: >+ 3 `rand` 4 CategoryID: commands 5 Summary: >- 6 Random field generator 7 Description: |- 8 `rand` can generate random numbers, strings and other data types. 9 Usage: |- 10 ``` 11 rand data-type [ max-value ] 12 ``` 13 Examples: |- 14 Random integer: 64-bit on 64-bit machines 15 16 ``` 17 rand int 18 ``` 19 20 Random integer between 0 and 9 21 22 ``` 23 rand int 9 24 ``` 25 26 Random floating point number between 0 and 1 27 28 ``` 29 rand float 30 ``` 31 32 Random string, fixed to 5 characters long 33 34 ``` 35 rand str 5 36 ``` 37 38 Flags: 39 int: Random integer, **max-value** specifies highest value for integer 40 num: Alias for **int** in this builtin 41 float: Random floating point number between 0 and 1. **max-value** not supported 42 str: 43 Random string of printable ASCII characters. **max-value** specifies the 44 fixed length of the string 45 "*": Alias for **str** (string) 46 Detail: |- 47 ### Security 48 49 WARNING: is should be noted that while `rand` can produce random numbers and 50 strings which might be useful for password generation, neither the RNG nor the 51 the random string generator (which is ostensibly the same RNG but applied to an 52 array of bytes within the range of printable ASCII characters) are considered 53 cryptographically secure. 54 Synonyms: 55 Related: 56 - format 57 - set 58 - let