Fix output size of lua encrypt method