ispassword2
Checks whether the password is stored.
Format
ispassword2 <filename> <password name>
Parameters
- string <filename>
- Password file name.
- string <password name>
- Password identifier.
Return Value
- System variable <result>
- When a password identified by <password name> exists in the password file, it is set to 1.
Otherwise, it is set to 0.
Remarks
Checks whether the password identified by <password name> exists in the password file <filename> created by the setpassword2 or getpassword2 command.
Example
strdim pw 2 username = 'foo' encryptstr = 'Sesame!' ispassword2 'password2.dat' username ; result: 0=false; 1=true if result = 1 then getpassword2 'password2.dat' username pw[0] encryptstr pw[1] = pw[0] else msg = 'What is your password for ' strconcat msg username strconcat msg '?' passwordbox msg 'Enter your password' pw[0] = inputstr pw[1] = pw[0] setpassword2 'password2.dat' username pw[0] encryptstr endif