function to create One Time Passwords (OTP)

Matthias Rebbe | M-R-D matthias_livecode_150811 at m-r-d.de
Mon Jul 7 18:58:48 EDT 2014


Hi,
i don´t know if this of use for someone, but here is a function, which creates a one time password (OTP). 
There are many devices out there (like routers) which offer one time password authentication for example for remote vpn dial in e.g. Draytek Vigor Routers.

function OTP pPin,pSecret
   put the seconds into tTime
   put char 1 to -2 of tTime into tTime
   put tTime & pSecret & pPin into tString
   put md5digest(tString) into tString
   get binarydecode("H6",tString,tOTP)
   return tOTP
end OT

Regards,

Matthias









More information about the use-livecode mailing list