mirror of
https://github.com/seiichiro0185/sailotp.git
synced 2024-12-22 03:32:30 +00:00
Github #28 Check Input for Valid Base32
This commit is contained in:
parent
714f1f1917
commit
2db3986513
11 changed files with 53 additions and 51 deletions
|
@ -115,6 +115,8 @@ Dialog {
|
|||
text: paramKey != "" ? paramKey : ""
|
||||
placeholderText: qsTr("Secret OTP Key")
|
||||
focus: true
|
||||
validator: RegExpValidator { regExp: /^(?:[A-Za-z2-7]{8})*(?:[A-Za-z2-7]{2}={6}|[A-Za-z2-7]{4}={4}|[A-Za-z2-7]{5}={3}|[A-Za-z2-7]{7}=)?$/ }
|
||||
inputMethodHints: Qt.ImhNoPredictiveText
|
||||
horizontalAlignment: TextInput.AlignLeft
|
||||
|
||||
EnterKey.enabled: text.length > 15
|
||||
|
@ -168,7 +170,7 @@ Dialog {
|
|||
}
|
||||
|
||||
// Check if we can Save
|
||||
canAccept: otpLabel.text.length > 0 && otpSecret.text.length >= 16 && otpLen.text >= 1 && ((paramType == "TOTP" && otpDiff.text != "") || paramType == "TOTP_STEAM" || otpCounter.text.length > 0) ? true : false
|
||||
canAccept: otpLabel.text.length > 0 && otpSecret.text.length >= 16 && otpSecret.acceptableInput && otpLen.text >= 1 && ((paramType == "TOTP" && otpDiff.text != "") || paramType == "TOTP_STEAM" || otpCounter.text.length > 0) ? true : false
|
||||
|
||||
// Save if page is Left with Add
|
||||
onDone: {
|
||||
|
|
|
@ -101,28 +101,28 @@ Lizenz: BSD (3-Klausel)</translation>
|
|||
<translation>Geheimer Schlüssel</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="128"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="130"/>
|
||||
<source>Length</source>
|
||||
<translation>Länge</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="130"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="132"/>
|
||||
<source>Length of the Token</source>
|
||||
<translation>Länge des Tokens</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="142"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="144"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="146"/>
|
||||
<source>Time Derivation (Seconds)</source>
|
||||
<translation>Zeitabweichung (Sekunden)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="156"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="158"/>
|
||||
<source>Next Counter Value</source>
|
||||
<translation>Nächster Zählerwert</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="158"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="160"/>
|
||||
<source>Next Value of the Counter</source>
|
||||
<translation>Nächster Wert für den Zähler</translation>
|
||||
</message>
|
||||
|
|
|
@ -101,28 +101,28 @@ Licencia: BSD (de 3 cláusulas)</translation>
|
|||
<translation>Llave secreta OTP</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="128"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="130"/>
|
||||
<source>Length</source>
|
||||
<translation>Longitud</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="130"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="132"/>
|
||||
<source>Length of the Token</source>
|
||||
<translation>Longitud del token</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="142"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="144"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="146"/>
|
||||
<source>Time Derivation (Seconds)</source>
|
||||
<translation>Derivación de tiempo (segundos)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="156"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="158"/>
|
||||
<source>Next Counter Value</source>
|
||||
<translation>Siguiente Contador</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="158"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="160"/>
|
||||
<source>Next Value of the Counter</source>
|
||||
<translation>Siguiente valor del contador</translation>
|
||||
</message>
|
||||
|
|
|
@ -101,28 +101,28 @@ Lisenssi: BSD (3-clause)</translation>
|
|||
<translation>Salainen OTP-avain</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="128"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="130"/>
|
||||
<source>Length</source>
|
||||
<translation>Pituus</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="130"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="132"/>
|
||||
<source>Length of the Token</source>
|
||||
<translation>Tunnuksen pituus</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="142"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="144"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="146"/>
|
||||
<source>Time Derivation (Seconds)</source>
|
||||
<translation>Aikapoikkeama (sekunneissa)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="156"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="158"/>
|
||||
<source>Next Counter Value</source>
|
||||
<translation>Seuraava laskenta-arvo</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="158"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="160"/>
|
||||
<source>Next Value of the Counter</source>
|
||||
<translation>Laskurin seuraava arvo</translation>
|
||||
</message>
|
||||
|
|
|
@ -100,28 +100,28 @@ Licence : BSD (3 clauses)</translation>
|
|||
<translation>Clé secrète OTP</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="128"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="130"/>
|
||||
<source>Length</source>
|
||||
<translation>Longueur</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="130"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="132"/>
|
||||
<source>Length of the Token</source>
|
||||
<translation>Longueur du jeton</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="142"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="144"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="146"/>
|
||||
<source>Time Derivation (Seconds)</source>
|
||||
<translation>Dérivation de temps (secondes)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="156"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="158"/>
|
||||
<source>Next Counter Value</source>
|
||||
<translation>Prochaine valeur du compteur</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="158"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="160"/>
|
||||
<source>Next Value of the Counter</source>
|
||||
<translation>Prochaine valeur du compteur</translation>
|
||||
</message>
|
||||
|
|
|
@ -101,28 +101,28 @@ Licenza: BSD (3-clause)</translation>
|
|||
<translation>Chiave OTP segreta</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="128"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="130"/>
|
||||
<source>Length</source>
|
||||
<translation>Lunghezza</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="130"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="132"/>
|
||||
<source>Length of the Token</source>
|
||||
<translation>Lunghezza del Token</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="142"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="144"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="146"/>
|
||||
<source>Time Derivation (Seconds)</source>
|
||||
<translation>Derivazione Temporale (Secondi)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="156"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="158"/>
|
||||
<source>Next Counter Value</source>
|
||||
<translation>Valore Prossimo Contatore</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="158"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="160"/>
|
||||
<source>Next Value of the Counter</source>
|
||||
<translation>Prossimo Valore del Contatore</translation>
|
||||
</message>
|
||||
|
|
|
@ -100,28 +100,28 @@ Licença: BSD (3-clause)</translation>
|
|||
<translation>Chave secreta OTP</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="128"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="130"/>
|
||||
<source>Length</source>
|
||||
<translation>Tamanho</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="130"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="132"/>
|
||||
<source>Length of the Token</source>
|
||||
<translation>Tamanho to Token</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="142"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="144"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="146"/>
|
||||
<source>Time Derivation (Seconds)</source>
|
||||
<translation>Derivação do tempo (segundos)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="156"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="158"/>
|
||||
<source>Next Counter Value</source>
|
||||
<translation>Próximo valor do contador</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="158"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="160"/>
|
||||
<source>Next Value of the Counter</source>
|
||||
<translation>Próximo valor do contador</translation>
|
||||
</message>
|
||||
|
|
|
@ -101,28 +101,28 @@ License: BSD (3-clause)</source>
|
|||
<translation>Секретный ключ OTP</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="128"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="130"/>
|
||||
<source>Length</source>
|
||||
<translation>Длина</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="130"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="132"/>
|
||||
<source>Length of the Token</source>
|
||||
<translation>Длина токена</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="142"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="144"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="146"/>
|
||||
<source>Time Derivation (Seconds)</source>
|
||||
<translation>Интервал расхождения (секунд)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="156"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="158"/>
|
||||
<source>Next Counter Value</source>
|
||||
<translation>Следующее значение счетчика</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="158"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="160"/>
|
||||
<source>Next Value of the Counter</source>
|
||||
<translation>Следующее значение счетчика</translation>
|
||||
</message>
|
||||
|
|
|
@ -101,28 +101,28 @@ Licens: BSD (3-clause)</translation>
|
|||
<translation>Hemlig OTP-nyckel</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="128"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="130"/>
|
||||
<source>Length</source>
|
||||
<translation>längd</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="130"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="132"/>
|
||||
<source>Length of the Token</source>
|
||||
<translation>Längden av token</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="142"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="144"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="146"/>
|
||||
<source>Time Derivation (Seconds)</source>
|
||||
<translation>Tidsavvikelsen (sekunder)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="156"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="158"/>
|
||||
<source>Next Counter Value</source>
|
||||
<translation>Nästa räknarvärde</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="158"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="160"/>
|
||||
<source>Next Value of the Counter</source>
|
||||
<translation>Nästa värde på räknaren</translation>
|
||||
</message>
|
||||
|
|
|
@ -100,28 +100,28 @@ License: BSD (3-clause)</source>
|
|||
<translation>OTP密钥</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="128"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="130"/>
|
||||
<source>Length</source>
|
||||
<translation>长度</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="130"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="132"/>
|
||||
<source>Length of the Token</source>
|
||||
<translation>令牌的长度</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="142"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="144"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="146"/>
|
||||
<source>Time Derivation (Seconds)</source>
|
||||
<translation>时间推导(秒)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="156"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="158"/>
|
||||
<source>Next Counter Value</source>
|
||||
<translation>下一个计数器的值</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="158"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="160"/>
|
||||
<source>Next Value of the Counter</source>
|
||||
<translation>下一个计数器的值</translation>
|
||||
</message>
|
||||
|
|
|
@ -99,28 +99,28 @@ License: BSD (3-clause)</source>
|
|||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="128"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="130"/>
|
||||
<source>Length</source>
|
||||
<translation>Length</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="130"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="132"/>
|
||||
<source>Length of the Token</source>
|
||||
<translation>Length of the Token</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="142"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="144"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="146"/>
|
||||
<source>Time Derivation (Seconds)</source>
|
||||
<translation>Time Derivation (Seconds)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="156"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="158"/>
|
||||
<source>Next Counter Value</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="158"/>
|
||||
<location filename="../qml/pages/AddOTP.qml" line="160"/>
|
||||
<source>Next Value of the Counter</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
|
|
Loading…
Reference in a new issue