Is it possible to mask out a string that will be a user password for loggining into an asset server?
Yes, use the
subtype='PASSWORD' for a StringProperty:
bpy.types.Scene.password = bpy.props.StringProperty(subtype='PASSWORD')
You can add it to the Scene tab for a quick test by running:
bpy.types.SCENE_PT_scene.prepend( lambda self, context: self.layout.prop(context.scene, "password"))
The property can be read and written like any property, but each character is drawn as an asterix if added to a panel. It is also not shown in tooltip (since 2.70), but it's possible to copy and paste. The main purpose is to hide the password on screen for video recordings, not to protect or encrypt it.