备份导出前置空校验,导入先选文件再输密码,版本/空备份校验、组id映射修复与 secret 查重统计
This commit is contained in:
@@ -3,25 +3,46 @@ package cn.airnan.a2fair.core.backup
|
|||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import cn.airnan.a2fair.crypto.CryptoManager
|
import cn.airnan.a2fair.crypto.CryptoManager
|
||||||
|
import cn.airnan.a2fair.data.normalizeSecret
|
||||||
import cn.airnan.a2fair.data.entity.Group
|
import cn.airnan.a2fair.data.entity.Group
|
||||||
import cn.airnan.a2fair.data.entity.Token
|
import cn.airnan.a2fair.data.entity.Token
|
||||||
import cn.airnan.a2fair.data.repository.TokenRepository
|
import cn.airnan.a2fair.data.repository.TokenRepository
|
||||||
import com.google.gson.Gson
|
import com.google.gson.Gson
|
||||||
|
import com.google.gson.JsonSyntaxException
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.flow.first
|
import kotlinx.coroutines.flow.first
|
||||||
import kotlinx.coroutines.withContext
|
import kotlinx.coroutines.withContext
|
||||||
import java.security.SecureRandom
|
import java.security.SecureRandom
|
||||||
|
import javax.crypto.AEADBadTagException
|
||||||
import javax.crypto.Cipher
|
import javax.crypto.Cipher
|
||||||
import javax.crypto.SecretKeyFactory
|
import javax.crypto.SecretKeyFactory
|
||||||
import javax.crypto.spec.GCMParameterSpec
|
import javax.crypto.spec.GCMParameterSpec
|
||||||
import javax.crypto.spec.PBEKeySpec
|
import javax.crypto.spec.PBEKeySpec
|
||||||
import javax.crypto.spec.SecretKeySpec
|
import javax.crypto.spec.SecretKeySpec
|
||||||
|
|
||||||
|
const val BACKUP_VERSION = 1
|
||||||
|
|
||||||
|
class EmptyBackupException : Exception("backup is empty")
|
||||||
|
|
||||||
|
class UnsupportedBackupVersionException :
|
||||||
|
Exception("backup version is newer than supported")
|
||||||
|
|
||||||
|
class WrongPasswordException : Exception("wrong backup password")
|
||||||
|
|
||||||
|
class InvalidBackupFileException : Exception("not a valid backup file")
|
||||||
|
|
||||||
data class BackupData(
|
data class BackupData(
|
||||||
|
val version: Int = BACKUP_VERSION,
|
||||||
val groups: List<Group>,
|
val groups: List<Group>,
|
||||||
val tokens: List<Token>
|
val tokens: List<Token>
|
||||||
)
|
)
|
||||||
|
|
||||||
|
data class ImportStats(
|
||||||
|
val groupsImported: Int,
|
||||||
|
val tokensImported: Int,
|
||||||
|
val tokensSkipped: Int
|
||||||
|
)
|
||||||
|
|
||||||
class BackupManager(
|
class BackupManager(
|
||||||
private val context: Context,
|
private val context: Context,
|
||||||
private val tokenRepository: TokenRepository,
|
private val tokenRepository: TokenRepository,
|
||||||
@@ -29,11 +50,16 @@ class BackupManager(
|
|||||||
) {
|
) {
|
||||||
private val gson = Gson()
|
private val gson = Gson()
|
||||||
|
|
||||||
|
suspend fun getTokenCount(): Int = tokenRepository.getAllTokens().first().size
|
||||||
|
|
||||||
suspend fun exportData(uri: Uri, password: CharArray): Result<Unit> = withContext(Dispatchers.IO) {
|
suspend fun exportData(uri: Uri, password: CharArray): Result<Unit> = withContext(Dispatchers.IO) {
|
||||||
try {
|
try {
|
||||||
val tokens = tokenRepository.getAllTokens().first()
|
val tokens = tokenRepository.getAllTokens().first()
|
||||||
|
if (tokens.isEmpty()) {
|
||||||
|
return@withContext Result.failure(EmptyBackupException())
|
||||||
|
}
|
||||||
val groups = tokenRepository.getAllGroups().first()
|
val groups = tokenRepository.getAllGroups().first()
|
||||||
|
|
||||||
// Decrypt tokens before exporting
|
// Decrypt tokens before exporting
|
||||||
val decryptedTokens = tokens.map { token ->
|
val decryptedTokens = tokens.map { token ->
|
||||||
token.copy(
|
token.copy(
|
||||||
@@ -41,8 +67,8 @@ class BackupManager(
|
|||||||
// So token.secret is already decrypted!
|
// So token.secret is already decrypted!
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
val backupData = BackupData(groups, decryptedTokens)
|
val backupData = BackupData(groups = groups, tokens = decryptedTokens)
|
||||||
val json = gson.toJson(backupData)
|
val json = gson.toJson(backupData)
|
||||||
val jsonBytes = json.toByteArray(Charsets.UTF_8)
|
val jsonBytes = json.toByteArray(Charsets.UTF_8)
|
||||||
|
|
||||||
@@ -74,50 +100,94 @@ class BackupManager(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun importData(uri: Uri, password: CharArray): Result<Unit> = withContext(Dispatchers.IO) {
|
suspend fun importData(uri: Uri, password: CharArray): Result<ImportStats> = withContext(Dispatchers.IO) {
|
||||||
try {
|
try {
|
||||||
val encryptedBytes = context.contentResolver.openInputStream(uri)?.use { input ->
|
val encryptedBytes = context.contentResolver.openInputStream(uri)?.use { input ->
|
||||||
input.readBytes()
|
input.readBytes()
|
||||||
} ?: return@withContext Result.failure(Exception("Could not open input stream"))
|
} ?: return@withContext Result.failure(InvalidBackupFileException())
|
||||||
|
|
||||||
var offset = 0
|
val salt: ByteArray
|
||||||
val saltLength = encryptedBytes[offset++].toInt()
|
val iv: ByteArray
|
||||||
val salt = encryptedBytes.copyOfRange(offset, offset + saltLength)
|
val data: ByteArray
|
||||||
offset += saltLength
|
try {
|
||||||
|
var offset = 0
|
||||||
val ivLength = encryptedBytes[offset++].toInt()
|
val saltLength = encryptedBytes[offset++].toInt()
|
||||||
val iv = encryptedBytes.copyOfRange(offset, offset + ivLength)
|
salt = encryptedBytes.copyOfRange(offset, offset + saltLength)
|
||||||
offset += ivLength
|
offset += saltLength
|
||||||
|
|
||||||
val data = encryptedBytes.copyOfRange(offset, encryptedBytes.size)
|
val ivLength = encryptedBytes[offset++].toInt()
|
||||||
|
iv = encryptedBytes.copyOfRange(offset, offset + ivLength)
|
||||||
|
offset += ivLength
|
||||||
|
|
||||||
|
data = encryptedBytes.copyOfRange(offset, encryptedBytes.size)
|
||||||
|
} catch (e: IndexOutOfBoundsException) {
|
||||||
|
return@withContext Result.failure(InvalidBackupFileException())
|
||||||
|
}
|
||||||
|
|
||||||
// Derive key
|
// Derive key
|
||||||
val factory = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA256")
|
val factory = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA256")
|
||||||
val spec = PBEKeySpec(password, salt, 10000, 256)
|
val spec = PBEKeySpec(password, salt, 10000, 256)
|
||||||
val secretKey = SecretKeySpec(factory.generateSecret(spec).encoded, "AES")
|
val secretKey = SecretKeySpec(factory.generateSecret(spec).encoded, "AES")
|
||||||
|
|
||||||
// Decrypt
|
// Decrypt; a GCM tag mismatch means the password is wrong
|
||||||
val cipher = Cipher.getInstance("AES/GCM/NoPadding")
|
val decryptedBytes = try {
|
||||||
val gcmSpec = GCMParameterSpec(128, iv)
|
val cipher = Cipher.getInstance("AES/GCM/NoPadding")
|
||||||
cipher.init(Cipher.DECRYPT_MODE, secretKey, gcmSpec)
|
val gcmSpec = GCMParameterSpec(128, iv)
|
||||||
val decryptedBytes = cipher.doFinal(data)
|
cipher.init(Cipher.DECRYPT_MODE, secretKey, gcmSpec)
|
||||||
|
cipher.doFinal(data)
|
||||||
|
} catch (e: AEADBadTagException) {
|
||||||
|
return@withContext Result.failure(WrongPasswordException())
|
||||||
|
}
|
||||||
|
|
||||||
val json = String(decryptedBytes, Charsets.UTF_8)
|
val json = String(decryptedBytes, Charsets.UTF_8)
|
||||||
val backupData = gson.fromJson(json, BackupData::class.java)
|
val backupData = try {
|
||||||
|
gson.fromJson(json, BackupData::class.java)
|
||||||
// Merge logic (simple replace or merge)
|
} catch (e: JsonSyntaxException) {
|
||||||
// For now, let's just insert all if not exists, or replace. We'll do a simple insert.
|
return@withContext Result.failure(InvalidBackupFileException())
|
||||||
|
}
|
||||||
|
|
||||||
|
if (backupData.version > BACKUP_VERSION) {
|
||||||
|
return@withContext Result.failure(UnsupportedBackupVersionException())
|
||||||
|
}
|
||||||
|
if (backupData.groups.isEmpty() && backupData.tokens.isEmpty()) {
|
||||||
|
return@withContext Result.failure(EmptyBackupException())
|
||||||
|
}
|
||||||
|
|
||||||
|
// Existing state for dedup and group name mapping
|
||||||
|
val existingSecrets = tokenRepository.getAllTokens().first()
|
||||||
|
.mapTo(mutableSetOf()) { it.secret.value.normalizeSecret() }
|
||||||
|
val groupNameToId = tokenRepository.getAllGroups().first()
|
||||||
|
.associate { it.name to it.id }
|
||||||
|
.toMutableMap()
|
||||||
|
|
||||||
|
// Restore groups, dedup by name, build old-id -> new-id mapping
|
||||||
|
val groupIdMapping = mutableMapOf<Long, Long>()
|
||||||
|
var groupsImported = 0
|
||||||
backupData.groups.forEach { group ->
|
backupData.groups.forEach { group ->
|
||||||
// Ensure group doesn't duplicate by name?
|
val targetId = groupNameToId[group.name] ?: run {
|
||||||
// For simplicity, insert directly, handle id mapping later if needed.
|
val newId = tokenRepository.insertGroup(group.copy(id = 0))
|
||||||
tokenRepository.insertGroup(group.copy(id = 0))
|
groupNameToId[group.name] = newId
|
||||||
|
groupsImported++
|
||||||
|
newId
|
||||||
|
}
|
||||||
|
groupIdMapping[group.id] = targetId
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Restore tokens: dedup by normalized secret, remap groupId
|
||||||
|
var tokensImported = 0
|
||||||
|
var tokensSkipped = 0
|
||||||
backupData.tokens.forEach { token ->
|
backupData.tokens.forEach { token ->
|
||||||
tokenRepository.insertToken(token.copy(id = 0))
|
if (token.secret.value.normalizeSecret() in existingSecrets) {
|
||||||
|
tokensSkipped++
|
||||||
|
return@forEach
|
||||||
|
}
|
||||||
|
val remappedGroupId = token.groupId?.let { groupIdMapping[it] }
|
||||||
|
tokenRepository.insertToken(token.copy(id = 0, groupId = remappedGroupId))
|
||||||
|
existingSecrets.add(token.secret.value.normalizeSecret())
|
||||||
|
tokensImported++
|
||||||
}
|
}
|
||||||
|
|
||||||
Result.success(Unit)
|
Result.success(ImportStats(groupsImported, tokensImported, tokensSkipped))
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
Result.failure(e)
|
Result.failure(e)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,3 +5,8 @@ data class SecretString(val value: String) {
|
|||||||
return "***"
|
return "***"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Normalizes a base32 secret for comparison: uppercase, strip non-alphabet chars. */
|
||||||
|
fun String.normalizeSecret(): String {
|
||||||
|
return this.uppercase().replace(Regex("[^A-Z2-7]"), "")
|
||||||
|
}
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ fun BackupScreen(
|
|||||||
var confirmPassword by remember { mutableStateOf("") }
|
var confirmPassword by remember { mutableStateOf("") }
|
||||||
var isExporting by remember { mutableStateOf(true) }
|
var isExporting by remember { mutableStateOf(true) }
|
||||||
var showPasswordDialog by remember { mutableStateOf(false) }
|
var showPasswordDialog by remember { mutableStateOf(false) }
|
||||||
|
var pendingImportUri by remember { mutableStateOf<Uri?>(null) }
|
||||||
|
|
||||||
val exportLauncher = rememberLauncherForActivityResult(
|
val exportLauncher = rememberLauncherForActivityResult(
|
||||||
contract = ActivityResultContracts.CreateDocument("application/octet-stream")
|
contract = ActivityResultContracts.CreateDocument("application/octet-stream")
|
||||||
@@ -40,6 +41,8 @@ fun BackupScreen(
|
|||||||
if (uri != null && password.isNotEmpty()) {
|
if (uri != null && password.isNotEmpty()) {
|
||||||
scope.launch {
|
scope.launch {
|
||||||
val result = backupManager.exportData(uri, password.toCharArray())
|
val result = backupManager.exportData(uri, password.toCharArray())
|
||||||
|
password = ""
|
||||||
|
confirmPassword = ""
|
||||||
if (result.isSuccess) {
|
if (result.isSuccess) {
|
||||||
Toast.makeText(context, context.getString(R.string.export_successful), Toast.LENGTH_SHORT).show()
|
Toast.makeText(context, context.getString(R.string.export_successful), Toast.LENGTH_SHORT).show()
|
||||||
} else {
|
} else {
|
||||||
@@ -52,15 +55,9 @@ fun BackupScreen(
|
|||||||
val importLauncher = rememberLauncherForActivityResult(
|
val importLauncher = rememberLauncherForActivityResult(
|
||||||
contract = ActivityResultContracts.OpenDocument()
|
contract = ActivityResultContracts.OpenDocument()
|
||||||
) { uri: Uri? ->
|
) { uri: Uri? ->
|
||||||
if (uri != null && password.isNotEmpty()) {
|
if (uri != null) {
|
||||||
scope.launch {
|
pendingImportUri = uri
|
||||||
val result = backupManager.importData(uri, password.toCharArray())
|
showPasswordDialog = true
|
||||||
if (result.isSuccess) {
|
|
||||||
Toast.makeText(context, context.getString(R.string.import_successful), Toast.LENGTH_SHORT).show()
|
|
||||||
} else {
|
|
||||||
Toast.makeText(context, context.getString(R.string.import_failed, result.exceptionOrNull()?.message ?: ""), Toast.LENGTH_LONG).show()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -95,8 +92,14 @@ fun BackupScreen(
|
|||||||
)
|
)
|
||||||
Button(
|
Button(
|
||||||
onClick = {
|
onClick = {
|
||||||
isExporting = true
|
scope.launch {
|
||||||
showPasswordDialog = true
|
if (backupManager.getTokenCount() == 0) {
|
||||||
|
Toast.makeText(context, context.getString(R.string.backup_empty_tokens), Toast.LENGTH_LONG).show()
|
||||||
|
} else {
|
||||||
|
isExporting = true
|
||||||
|
showPasswordDialog = true
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
modifier = Modifier.fillMaxWidth()
|
modifier = Modifier.fillMaxWidth()
|
||||||
) {
|
) {
|
||||||
@@ -117,7 +120,7 @@ fun BackupScreen(
|
|||||||
Button(
|
Button(
|
||||||
onClick = {
|
onClick = {
|
||||||
isExporting = false
|
isExporting = false
|
||||||
showPasswordDialog = true
|
importLauncher.launch(arrayOf("application/octet-stream", "*/*"))
|
||||||
},
|
},
|
||||||
modifier = Modifier.fillMaxWidth()
|
modifier = Modifier.fillMaxWidth()
|
||||||
) {
|
) {
|
||||||
@@ -167,7 +170,35 @@ fun BackupScreen(
|
|||||||
if (isExporting) {
|
if (isExporting) {
|
||||||
exportLauncher.launch("a2fair_backup_${System.currentTimeMillis()}.bak")
|
exportLauncher.launch("a2fair_backup_${System.currentTimeMillis()}.bak")
|
||||||
} else {
|
} else {
|
||||||
importLauncher.launch(arrayOf("application/octet-stream", "*/*"))
|
val uri = pendingImportUri
|
||||||
|
pendingImportUri = null
|
||||||
|
if (uri != null) {
|
||||||
|
scope.launch {
|
||||||
|
val result = backupManager.importData(uri, password.toCharArray())
|
||||||
|
val stats = result.getOrNull()
|
||||||
|
if (stats != null) {
|
||||||
|
Toast.makeText(
|
||||||
|
context,
|
||||||
|
context.getString(R.string.import_success_stats, stats.tokensImported, stats.tokensSkipped, stats.groupsImported),
|
||||||
|
Toast.LENGTH_LONG
|
||||||
|
).show()
|
||||||
|
} else {
|
||||||
|
val messageRes = when (result.exceptionOrNull()) {
|
||||||
|
is cn.airnan.a2fair.core.backup.EmptyBackupException -> R.string.import_empty_backup
|
||||||
|
is cn.airnan.a2fair.core.backup.UnsupportedBackupVersionException -> R.string.import_unsupported_version
|
||||||
|
is cn.airnan.a2fair.core.backup.WrongPasswordException -> R.string.import_wrong_password
|
||||||
|
is cn.airnan.a2fair.core.backup.InvalidBackupFileException -> R.string.import_invalid_file
|
||||||
|
else -> null
|
||||||
|
}
|
||||||
|
if (messageRes != null) {
|
||||||
|
Toast.makeText(context, context.getString(messageRes), Toast.LENGTH_LONG).show()
|
||||||
|
} else {
|
||||||
|
Toast.makeText(context, context.getString(R.string.import_failed, result.exceptionOrNull()?.message ?: ""), Toast.LENGTH_LONG).show()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
password = ""
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -178,8 +209,9 @@ fun BackupScreen(
|
|||||||
},
|
},
|
||||||
dismissButton = {
|
dismissButton = {
|
||||||
TextButton(
|
TextButton(
|
||||||
onClick = {
|
onClick = {
|
||||||
showPasswordDialog = false
|
showPasswordDialog = false
|
||||||
|
pendingImportUri = null
|
||||||
password = ""
|
password = ""
|
||||||
confirmPassword = ""
|
confirmPassword = ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import cn.airnan.a2fair.A2FairApplication
|
|||||||
import cn.airnan.a2fair.R
|
import cn.airnan.a2fair.R
|
||||||
import cn.airnan.a2fair.core.OtpUriParser
|
import cn.airnan.a2fair.core.OtpUriParser
|
||||||
import cn.airnan.a2fair.data.SecretString
|
import cn.airnan.a2fair.data.SecretString
|
||||||
|
import cn.airnan.a2fair.data.normalizeSecret
|
||||||
import cn.airnan.a2fair.data.entity.HashAlgorithm
|
import cn.airnan.a2fair.data.entity.HashAlgorithm
|
||||||
import cn.airnan.a2fair.data.entity.Token
|
import cn.airnan.a2fair.data.entity.Token
|
||||||
import cn.airnan.a2fair.data.entity.TokenType
|
import cn.airnan.a2fair.data.entity.TokenType
|
||||||
@@ -242,10 +243,6 @@ class TokensViewModel(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun String.normalizeSecret(): String {
|
|
||||||
return this.uppercase().replace(Regex("[^A-Z2-7]"), "")
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun saveToken(token: Token) {
|
private fun saveToken(token: Token) {
|
||||||
viewModelScope.launch {
|
viewModelScope.launch {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -32,6 +32,12 @@
|
|||||||
<string name="add_token_title">添加令牌</string>
|
<string name="add_token_title">添加令牌</string>
|
||||||
<string name="scanning_hint">扫描中…</string>
|
<string name="scanning_hint">扫描中…</string>
|
||||||
<string name="camera_permission_hint">需要相机权限才能扫码</string>
|
<string name="camera_permission_hint">需要相机权限才能扫码</string>
|
||||||
|
<string name="backup_empty_tokens">没有可备份的令牌,请先添加令牌</string>
|
||||||
|
<string name="import_empty_backup">备份文件中没有任何令牌或分组</string>
|
||||||
|
<string name="import_unsupported_version">该备份由更新版本的应用创建,请先升级应用</string>
|
||||||
|
<string name="import_wrong_password">密码不正确,请重新输入</string>
|
||||||
|
<string name="import_invalid_file">该文件不是有效的 2FAir 备份文件</string>
|
||||||
|
<string name="import_success_stats">已导入 %1$d 个令牌(跳过 %2$d 个重复),新增 %3$d 个分组</string>
|
||||||
<string name="account_name_required">账户名称(必填)</string>
|
<string name="account_name_required">账户名称(必填)</string>
|
||||||
<string name="secret_key_required">密钥(必填)</string>
|
<string name="secret_key_required">密钥(必填)</string>
|
||||||
<string name="issuer_optional">发行方(选填)</string>
|
<string name="issuer_optional">发行方(选填)</string>
|
||||||
|
|||||||
@@ -32,6 +32,12 @@
|
|||||||
<string name="add_token_title">新增權杖</string>
|
<string name="add_token_title">新增權杖</string>
|
||||||
<string name="scanning_hint">掃描中…</string>
|
<string name="scanning_hint">掃描中…</string>
|
||||||
<string name="camera_permission_hint">需要相機權限才能掃碼</string>
|
<string name="camera_permission_hint">需要相機權限才能掃碼</string>
|
||||||
|
<string name="backup_empty_tokens">沒有可備份的權杖,請先新增權杖</string>
|
||||||
|
<string name="import_empty_backup">備份檔案中沒有任何權杖或分組</string>
|
||||||
|
<string name="import_unsupported_version">該備份由更新版本的應用程式建立,請先升級應用程式</string>
|
||||||
|
<string name="import_wrong_password">密碼不正確,請重新輸入</string>
|
||||||
|
<string name="import_invalid_file">該檔案不是有效的 2FAir 備份檔案</string>
|
||||||
|
<string name="import_success_stats">已匯入 %1$d 個權杖(略過 %2$d 個重複),新增 %3$d 個分組</string>
|
||||||
<string name="account_name_required">帳戶名稱(必填)</string>
|
<string name="account_name_required">帳戶名稱(必填)</string>
|
||||||
<string name="secret_key_required">金鑰(必填)</string>
|
<string name="secret_key_required">金鑰(必填)</string>
|
||||||
<string name="issuer_optional">發行方(選填)</string>
|
<string name="issuer_optional">發行方(選填)</string>
|
||||||
|
|||||||
@@ -32,6 +32,12 @@
|
|||||||
<string name="add_token_title">Add Token</string>
|
<string name="add_token_title">Add Token</string>
|
||||||
<string name="scanning_hint">Scanning…</string>
|
<string name="scanning_hint">Scanning…</string>
|
||||||
<string name="camera_permission_hint">Camera permission is required to scan QR codes.</string>
|
<string name="camera_permission_hint">Camera permission is required to scan QR codes.</string>
|
||||||
|
<string name="backup_empty_tokens">No tokens to back up. Add a token first.</string>
|
||||||
|
<string name="import_empty_backup">This backup file contains no tokens or groups.</string>
|
||||||
|
<string name="import_unsupported_version">This backup was created by a newer app version. Please update the app.</string>
|
||||||
|
<string name="import_wrong_password">Password is incorrect. Please try again.</string>
|
||||||
|
<string name="import_invalid_file">This file is not a valid 2FAir backup.</string>
|
||||||
|
<string name="import_success_stats">Imported %1$d tokens (%2$d duplicates skipped), %3$d new groups.</string>
|
||||||
<string name="account_name_required">Account Name (Required)</string>
|
<string name="account_name_required">Account Name (Required)</string>
|
||||||
<string name="secret_key_required">Secret Key (Required)</string>
|
<string name="secret_key_required">Secret Key (Required)</string>
|
||||||
<string name="issuer_optional">Issuer (Optional)</string>
|
<string name="issuer_optional">Issuer (Optional)</string>
|
||||||
|
|||||||
Reference in New Issue
Block a user