Forum Discussion
hooleylist
Jan 29, 2013Cirrostratus
http://devcentral.f5.com/Community/GroupDetails/tabid/1082223/aff/5/afv/topic/aft/2163201/afc/2263687/Default.aspx
Here are two options. The rand option should be more efficient but not cryptographically secure. You can compare the CPU usage using the timing command.
Use rand() to generate a psuedo-random 8 digit number (not cryptographically secure)
format %010s [expr { int(100000000 * rand()) }]
Use AES::key to generate a cryptographically secure unique ID
set uid [string range [AES::key 256] 8 end]
Use timing to do a performance comparison:
https://devcentral.f5.com/wiki/iRules.timing.ashx
Aaron