import javax.crypto.*; import javax.crypto.spec.*; public class DESKrypt{ public static void main(String argumendid[]) throws Exception{ byte[] avatekstibaidid=new byte[8]; byte[] votmebaidid=new byte[8]; for(int i=0; i<8; i++){ avatekstibaidid[i]=(byte)0x00; votmebaidid[i]=(byte)0xFF; } SecretKey voti=SecretKeyFactory.getInstance("DES").generateSecret( new DESKeySpec(votmebaidid) ); Cipher kodeerija=Cipher.getInstance("DES"); kodeerija.init(Cipher.ENCRYPT_MODE, voti); byte[] salatekst=kodeerija.doFinal(avatekstibaidid); for(int i=0; i