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;