diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/utils/Otp.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/utils/Otp.java b/app/src/main/java/com/zeapo/pwdstore/utils/Otp.java index 0bacd684..2e6bebd6 100644 --- a/app/src/main/java/com/zeapo/pwdstore/utils/Otp.java +++ b/app/src/main/java/com/zeapo/pwdstore/utils/Otp.java @@ -43,13 +43,13 @@ public class Otp { code[0] = (byte) (0x7f & code[0]); String strCode = new BigInteger(code).toString(); if (digits.equals("s")) { - String output = ""; + StringBuilder output = new StringBuilder(); int bigInt = new BigInteger(code).intValue(); for (int i = 0; i != 5; i++) { - output += steam[bigInt % 26]; + output.append(steam[bigInt % 26]); bigInt /= 26; } - return output; + return output.toString(); } else return strCode.substring(strCode.length() - Integer.parseInt(digits)); } |