From 039f711a4e9de79fe88197675ab4ab5ca97c19de Mon Sep 17 00:00:00 2001 From: Jon Griffiths Date: Fri, 8 Apr 2016 21:14:39 +1200 Subject: [PATCH] Fix a logic error and a typo --- Model/Bip38KeyPair.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Model/Bip38KeyPair.cs b/Model/Bip38KeyPair.cs index 3765147..464b748 100644 --- a/Model/Bip38KeyPair.cs +++ b/Model/Bip38KeyPair.cs @@ -255,11 +255,11 @@ private KeyPair decryptUsingIntermediate(Bip38Intermediate intermediate, byte[] /// Encryption constructor (non-EC-multiply) /// public Bip38KeyPair(KeyPair key, string passphrase) { - if (passphrase == null && passphrase == "") { + if (passphrase == null || passphrase == "") { throw new ArgumentException("Passphrase is required"); } - if (key == null) throw new ArgumentException("Passphrase is required"); + if (key == null) throw new ArgumentException("Key is required"); this.IsCompressedPoint = key.IsCompressedPoint; this._addressType = key.AddressType;