// deriveKey : generate the SQLCipher crypto key, possibly with the 64-bit Keyfile
deriveKey : generate the SQLCipher crypto key, possibly with the 64-bit Keyfile
// deriveKey : generate the SQLCipher crypto key possibly with the 64 - bit Keyfile
func (v *Vault) deriveKey(masterPassword []byte, salt []byte) ([]byte, error) {
	if v.vaultInfo.KDFAlgo != keyDerivationAlgo {
		return nil, errors.New("key derivation algo has changed, open up a github issue")
	}
	if v.vaultInfo.EncryptionAlgo != dbEncryptionAlgo {
		return nil, errors.New("database encryption algo has changed, open up a github issue")
	}
	return pbkdf2.Key(masterPassword, salt, v.vaultInfo.KDFIterations, sha512.Size, sha512.New), nil
}
func ( v * Vault ) deriveKey ( masterPassword [ ] byte , salt [ ] byte ) ( [ ] byte , error ) { if v . vaultInfo . KDFAlgo != keyDerivationAlgo { return nil , errors . New ( " " ) } if v . vaultInfo . EncryptionAlgo != dbEncryptionAlgo { return nil , errors . New ( " " ) } return pbkdf2 . Key ( masterPassword , salt , v . vaultInfo . KDFIterations , sha512 . Size , sha512 . New ) , nil }
deriveKey : generate the SQLCipher crypto key, possibly with the 64-bit Keyfile
deriveKey : generate the SQLCipher crypto key possibly with the 64 - bit Keyfile
// The database key is derived from the master password // and the database salt with 100k iterations of PBKDF2-HMAC-SHA512