Προς το περιεχόμενο

AMIOX?

Members
  • ΜΗΝΥΜΑΤΑ FORUM

    57
  • ΜΕΛΟΣ

  • ΤΕΛ. ΕΠΙΣΚΕΨΗ

AMIOX?'s Achievements

Proficient

Proficient (10/15)

  • Πρώτο Μήνυμα
  • Collaborator
  • Εκκίνηση Συζήτησης
  • 1 Εβδομάδα Μετά
  • Ένα Μήνα Μετά

Πρόσφατες Διακρίσεις

4

Φήμη

  1. AMIOX?

    askisi java

    Το button Start το κάνεις .setBounds πριν το κάνεις new.
  2. AMIOX?

    askisi java

    errika δεν είσαι σε τμήμα πληροφορικής έτσι?
  3. Έχετε κανέναν αλγόριθμο στον νου σας? γιατί δεν μου βγαίνει με τίποτα. δεν θέλω ετοιμο κώδικα απλά με δύο λόγια πως μπορει να γίνει
  4. ok με στατικούς.. πως θα τους γεμίσω είναι η ερώτηση. Όχι χειροκίνητα βέβαια.
  5. Καλησπέρα, Έχω 4 αριθμούς: 1, 2, 3,4 και θέλω να φτιάξω έναν πίνακα που κάθε γραμμή θα έχει και έναν διαφορετικό συνδυασμό αυτών, Συνολικά ο πίνακας θα έχει 4^4 256 γραμμές: π.χ.: 1 2 3 4 2 1 3 4 3 2 1 4 ... καμιά ιδέα πως μπορεί να γίνει σε C?
  6. Ξέρετε κανέναν καλό compiler/Interpreter για την lisp?? έχω τo LispWorks άλλα έχει πολλά προβλήματα. Ευχαριστώ.
  7. AMIOX?

    encrypt/decrypt Java

    encrypt: KeyGenerator keyGenerator = KeyGenerator.getInstance("TripleDES"); keyGenerator.init(168); SecretKey key = keyGenerator.generateKey(); System.out.println("Done generating the key."); // Create a cipher using that key to initialize it Cipher cipher = Cipher.getInstance("TripleDES/ECB/PKCS5Padding"); cipher.init(Cipher.ENCRYPT_MODE, key); byte[] plaintextBytes = msg.getBytes(); // Perform the actual encryption byte[] cipherText = cipher.doFinal(plaintextBytes); // Now we need to Base64-encode it for ascii display BASE64Encoder encoder = new BASE64Encoder(); String output = encoder.encode(cipherText); System.out.println("Ciphertext: "+output); /* Create a keystore and place the key in it * We're using a jceks keystore, which is provided by Sun's JCE. * If you don't have the JCE installed, you can use "JKS", * which is the default keystore. It doesn't provide * the same level of protection however. */ KeyStore keyStore = KeyStore.getInstance("JCEKS"); // This initializes a blank keystore keyStore.load(null, null); // Now we add the key to the keystore, protected // by the password. keyStore.setKeyEntry("exampleKey", key, pass.toCharArray(), null); // Store the password to the filesystem, protected // by the same password. FileOutputStream fos = new FileOutputStream(FILENAME); keyStore.store(fos, pass.toCharArray()); fos.close(); decrypt: KeyStore keyStore = KeyStore.getInstance("JCEKS"); FileInputStream fis = new FileInputStream(FILENAME); keyStore.load(fis, pass.toCharArray()); fis.close(); SecretKey key = (SecretKey)keyStore.getKey("exampleKey",pass.toCharArray()); // Create a cipher using that key to initialize it Cipher cipher = Cipher.getInstance("TripleDES/ECB/PKCS5Padding"); cipher.init(Cipher.DECRYPT_MODE, key); // Perform the decryption, first BASE64 decoding the ciphertext byte[] ciphertextBytes = new BASE64Decoder().decodeBuffer(from); byte[] decryptedText = cipher.doFinal(ciphertextBytes); String output = new String(decryptedText); System.out.println("Plaintext: "+output); σφάλμα: Απρ 18, 2014 5:46:16 ΜΜ chatserver.server5 run SEVERE: null javax.crypto.IllegalBlockSizeException: Input length must be multiple of 8 when decrypting with padded cipher at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:750) at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:676) at com.sun.crypto.provider.DESedeCipher.engineDoFinal(DESedeCipher.java:294) at javax.crypto.Cipher.doFinal(Cipher.java:2087) Στην εντολή "byte[] decryptedText = cipher.doFinal(ciphertextBytes);" έχει το παραπάνω σφάλμα. Ξέρει κανείς πως το μέγεθος του input θα το κάνω πολλαπλάσιο του 8?
  8. χαχα Την έχω λύσει αυτή δες βίντεο https://www.youtube.com/watch?v=bCbOt-Rwy3M. Τον αλγόριθμο για την εύρεση του Potter τον έχεις έτοιμο απο το βιβλίο της αλγοριθμικής.
  9. Σε ποιo τμήμα είσαι; Πάντως στο τμήμα πληροφορικής του ΤΕΙ Αθήνας δεν υπάρχουν θέματα να συμπληρώσεις παρενθέσεις κτλ που αναφέρθηκε παραπάνω (δεν πιστεύω να ισχύει για κανένα τμήμα πληροφορικής αυτό, ίσως σε κανένα τμήμα ΣΔΟ) edit*
  10. Αυτό γιατί είναι γιατί είναι ακριβότερο απο αυτό ;;
  11. To παραπάνω δεν έχει windows όμως, τόσο άσχημη είναι η κάρτα στο άλλο?
  12. Παιδιά αυτό αξίζει το 400άρι;
  13. AMIOX?

    Απλό Laptop

    Κοιτα και αυτό στα ίδια λεφτά.
  14. AMIOX?

    Απλό Laptop

    Και εγω ψάχνω παιδιά πείτε ιδέες...
  • Δημιουργία νέου...