DES encryption with data length 132 byte
Posted: Thu Mar 09, 2017 11:27 pm
I have to use DES alg in my applet. But the length of Data are 132 bytes. So I wonder if it's feasible to implement DES encryption with data length 132 byte?
Code: Select all
skey = (DESKey) KeyBuilder.buildKey(KeyBuilder.TYPE_DES,KeyBuilder.LENGTH_DES3_2KEY, false);
cDES = Cipher.getInstance(Cipher.ALG_DES_CBC_ISO9797_M2, false);
cDES.init(skey, Cipher.MODE_ENCRYPT);
cDES.doFinal(Data, doffset, dlen, EBuffer, eoffset); // Data and EBuffer are 132 byte length