Improve valid() for openssl-enc, fixing #498

A segfault was caused by am empty "known plaintext" field at the
end of the hash.