Diff

Differences From Artifact [30e8cf2947]:

To Artifact [c455a1a52a]:


4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
	set wallet(seed)    [binary decode hex $walletArray(0000000000000000000000000000000000000000000000000000000000000005)]
	set wallet(index)   [expr 0x$walletArray(0000000000000000000000000000000000000000000000000000000000000006)]

	if {$wallet(version) != 4} {
		return -code error "Unsupported wallet backup version ($version)"
	}

	set password ""
	set walletKeyIV [string range $wallet(salt) 0 15]
	set seedIV      [string range $wallet(salt) 16 end]

	# Decrypt seed
	set aesKey    [::nano::internal::deriveKeyFromPassword $password $wallet(salt)]
	set walletKey [::nano::internal::AES256-CTR $aesKey $walletKeyIV $wallet(key)]
	set seed      [::nano::internal::AES256-CTR $walletKey $seedIV $wallet(seed)]







<







4094
4095
4096
4097
4098
4099
4100

4101
4102
4103
4104
4105
4106
4107
	set wallet(seed)    [binary decode hex $walletArray(0000000000000000000000000000000000000000000000000000000000000005)]
	set wallet(index)   [expr 0x$walletArray(0000000000000000000000000000000000000000000000000000000000000006)]

	if {$wallet(version) != 4} {
		return -code error "Unsupported wallet backup version ($version)"
	}


	set walletKeyIV [string range $wallet(salt) 0 15]
	set seedIV      [string range $wallet(salt) 16 end]

	# Decrypt seed
	set aesKey    [::nano::internal::deriveKeyFromPassword $password $wallet(salt)]
	set walletKey [::nano::internal::AES256-CTR $aesKey $walletKeyIV $wallet(key)]
	set seed      [::nano::internal::AES256-CTR $walletKey $seedIV $wallet(seed)]