Community discussions

MikroTik App
 
CuriousKiwi
newbie
Topic Author
Posts: 29
Joined: Thu Feb 05, 2015 2:44 am

Built in hash function

Thu Feb 12, 2015 12:18 am

Are there any built in hash functions in RouterOS?

Anything would be great, SHA1/2 or even MD5 would be fine. I want to have a WiFi password set (from device info such as serial number and wifi MAC) in the default configuration script so it's persisted between system resets.
 
mike548141
Frequent Visitor
Frequent Visitor
Posts: 51
Joined: Sun Aug 16, 2020 5:14 am

Re: Built in hash function

Sun Jan 09, 2022 8:15 am

I know this is 7 years later - but thought I would post the idea in case some one is Googling for a similar idea.
My recommendation would be to use OTP to create a unique password, and then store that password in a file in the devices local storage. Not great security but neither is using the same password for the device anyway (not saying there are not valid use cases for that however).
Then when you setup/boot the device it can check if the file exists, if it does then read the password from the file. If not then create a new one.
:local mypassword ([ /certificate scep-server otp generate minutes-valid=0 as-value; ]->"password");
MC

Who is online

Users browsing this forum: No registered users and 41 guests