Add input length checks for seal/open_inplace

This is so that the slice_to calls in those functions won't call panic!
if the input is too short