Xbasic
SQL::ConnectionMaskPassword Method
Syntax
String as C = MaskPassword(Password as C)
Arguments
- PasswordCharacter
Password to mask.
Returns
- StringCharacter
Unreadable string.
Description
Changes the characters in a password string so they will not display well.
Discussion
The MaskPassword() method produces an unreadable version of a password. AlphaDAO drivers can unmask the password if they need it to connect to a database.
The purpose of masking a password is to prevent it from displaying in a readable form. This function does not encrypt the password!
If you choose to embed a password in a script, it is only as secure as your script.
Example
dim conn as SQL::Connection
dim connString as C
connString = "{A5API='Access', FileName='c:\program files\a5v8\mdbfiles\alphasports.mdb'}"
if .not. conn.open(connString
ui_msg_box("Error", conn.CallResult.text)
end
end if
ui_msg_box("Masked Password", conn.MaskPassword("MyPassword"))
conn.close()This is not a form of encryption. This method simply makes the password unreadable.
See Also