global-functions: $GetRandom20CharHex: use :rndstr

This is available in RouterOS 7.x...

Signed-off-by: Christian Hesse <mail@eworm.de>
This commit is contained in:
Michael Gisbers 2022-08-04 00:47:27 +02:00 committed by Christian Hesse
parent e31a99a301
commit 0562198c55

View file

@ -402,7 +402,7 @@
# generate random 20 chars hex (0-9 and a-f)
:set GetRandom20CharHex do={
:return ([ /certificate/scep-server/otp/generate minutes-valid=0 as-value ]->"password");
:return [ :rndstr length=20 from="0123456789abcdef" ];
}
# generate random number