Fix copied code typo

changes the check to the crypted text rather than the so-far uninitialized plaintext.