Move length check to secureAndSplit(), so it is always used.