fix passcode generation

This commit is contained in:
Milos Kozak 2019-07-17 21:16:36 +02:00
parent b26b583f2b
commit 1b937bfe08

View file

@ -790,7 +790,7 @@ public class SmsCommunicatorPlugin extends PluginBase {
passCode += Character.toString((char) (startChar2 + Math.random() * ('z' - 'a' + 1))); passCode += Character.toString((char) (startChar2 + Math.random() * ('z' - 'a' + 1)));
int startChar3 = Math.random() > 0.5 ? 'a' : 'A'; int startChar3 = Math.random() > 0.5 ? 'a' : 'A';
passCode += Character.toString((char) (startChar3 + Math.random() * ('z' - 'a' + 1))); passCode += Character.toString((char) (startChar3 + Math.random() * ('z' - 'a' + 1)));
passCode.replace('l', 'k').replace('I', 'J'); passCode = passCode.replace('l', 'k').replace('I', 'J');
return passCode; return passCode;
} }