classMyClass{publicvoidtest1(){Cipherc=Cipher.getInstance("DES/ECB/PKCS5Padding");c.init(Cipher.ENCRYPT_MODE,k,iv);byte[]cipherText=c.doFinal(plainText);}publicvoidtest2(){Cipherc=Cipher.getInstance("DESede/ECB/PKCS5Padding");c.init(Cipher.ENCRYPT_MODE,k,iv);byte[]cipherText=c.doFinal(plainText);}publicvoidtest3(){javax.crypto.Cipherc=javax.crypto.Cipher.getInstance("DES/ECB/PKCS5Padding");// Prepare the cipher to encryptjavax.crypto.SecretKeykey=javax.crypto.KeyGenerator.getInstance("DES").generateKey();java.security.spec.AlgorithmParameterSpecparamSpec=newjavax.crypto.spec.IvParameterSpec(iv);c.init(javax.crypto.Cipher.ENCRYPT_MODE,key,paramSpec);}}