feat(dubp): support member wallet from legacy salt+password
This commit is contained in:
parent
706799afcd
commit
e3529c4aba
|
@ -32,7 +32,11 @@ pub(crate) fn compute_secret_code_len(
|
||||||
}
|
}
|
||||||
SecretCodeType::Letters => {
|
SecretCodeType::Letters => {
|
||||||
if member_wallet {
|
if member_wallet {
|
||||||
Ok(10)
|
if log_n >= 15 {
|
||||||
|
Ok(7)
|
||||||
|
} else {
|
||||||
|
Ok(8)
|
||||||
|
}
|
||||||
} else if log_n >= 15 {
|
} else if log_n >= 15 {
|
||||||
Ok(5)
|
Ok(5)
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -122,6 +122,7 @@ class DubpRust {
|
||||||
String salt,
|
String salt,
|
||||||
String password,
|
String password,
|
||||||
SecretCodeType secretCodeType = SecretCodeType.letters,
|
SecretCodeType secretCodeType = SecretCodeType.letters,
|
||||||
|
bool isMember = false,
|
||||||
}) async {
|
}) async {
|
||||||
int ram = SysInfo.getTotalPhysicalMemory();
|
int ram = SysInfo.getTotalPhysicalMemory();
|
||||||
print('ram=$ram');
|
print('ram=$ram');
|
||||||
|
@ -134,7 +135,7 @@ class DubpRust {
|
||||||
Utf8.toUtf8(currency),
|
Utf8.toUtf8(currency),
|
||||||
Utf8.toUtf8(salt),
|
Utf8.toUtf8(salt),
|
||||||
Utf8.toUtf8(password),
|
Utf8.toUtf8(password),
|
||||||
0,
|
isMember ? 1 : 0,
|
||||||
secretCodeType.index,
|
secretCodeType.index,
|
||||||
ram,
|
ram,
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue