- Home /
Is it feasible to hide the password and serial key when activating a license from the command line
I am developing an automation tool for Unity, one of the tool features I was asked to implement is to activate the Unity on their PC.
The command line is the best option for me according to the guide (https://docs.unity3d.com/Manual/OnlineActivationGuide.html) through, I need to hide some sensitive values (eg. the user's password and their serial key).
Is it possible to hide them from the command line? As we can easily see the external arguments passed to an executable through task manager such as Process Explorer, I basically want to avoid them shown to the users.
On CI environment, the quick answer is NO. Password still need to be stored in plain text somewhere. In encrypted .env file or store in CI program directly and only injected to env during build.
From normal dev perspective, it is not that much important. As long as the password not show in log file then it is fine.
Beside if unity hub is installed, Unity.exe automatically get license from UnityHub. (Only work on Mac and Window though)
vadprimary. Thanks for your input.
I am not too much worried about the CI. My scenario is to use the command line on user's PC. The purpose of the cryptography is to protect the sensitive data from the unknown users. If they are still shown as a plain in the command line, it doesn't mean anything to me to digest them in the Unity license file. if they can be shown that easy way, it is not the thing we can compromise.
Answer by Patrickmol · Jun 16, 2021 at 07:44 AM
I have no idea how to do that but I can just suggest just this, I hope I'll help somehow
string shownPassword;
string password;
OnInputEnter() // I suppose there is a thing like this
{
password += input.text.Substring(inputField.text.Length-1);
password = password.Substring(0, inputField.text.Length);
shownPassword = "";
foreach(Char c in password)
shownPassword += '*';
inputFIeld.text = shownPassword
}
Thanks Patrickmol for your input.
This is not about a Unity project but the Unity activation.
if it is html, else I can't help you.
<input type="password/>