LE-to-BE conversion moved before encrypting in send function