Diff

Differences From Artifact [c455a1a52a]:

To Artifact [7e83f74db7]:


4096
4097
4098
4099
4100
4101
4102


4103
4104
4105
4106
4107
4108
4109

	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)]

	# Format results







>
>







4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111

	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]

	# XXX:TODO: Check the password against "check"

	# 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)]

	# Format results