I'm currently trying to write a script that has a username & password input which then returns some data if the user has appropriate access. The script works just fine when I hardcode my own credentials in.
The problem I have is that I don't know how to mask password input using the "Add Script" wizard. It appears there is an option to accept an Encrypted String as a parameter, which appears to be what I want, but I can't find any documentation on how to actually utilize the GPEncryptedString class within Python. When I try to extract the parameter with arcpy.getParameterAsText(), it just returns a bunch of asterisks as a string value which obviously does me no good.
I even tried just popping up my own username/password dialog, but scripts have to be ran with the "Always in Foreground" option for the arcpy.mapping.MapDocument("CURRENT") command to work properly, which constantly steals focus from my dialog.
This seems like a really simple problem, but I'm just not finding any documentation anywhere on this issue and I've now spent more time trying to figure out a way to mask password input than I spent on the actual script itself.