Fix encryption casting problem on 64 bit big endian platforms (eg, s390x,
ppc64, sparc64).