Kfs io: fix Crypt return value, implement input buffer sanity check.