Created
January 23, 2017 17:24
-
-
Save ulymarins/8a928e78e64fae48463ac699b00385c6 to your computer and use it in GitHub Desktop.
Crypto 4all
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class App { | |
public static void main(String [] args) { | |
System.out.println("Chave 16bits: G3r0m3lcr1pt0666"); | |
System.out.println("Vetor: RandomInitVector"); | |
System.out.println("Iniciando criptografia"); | |
String conteudoCriptografado = Crypto.encryptAES("tipoQr=4park&valorPassagem=250&id4all=2345"); | |
System.out.println("Conteúdo criptografado: " + conteudoCriptografado); | |
System.out.println("Descriptografando..."); | |
System.out.println("Conteudo descriptografado: " + Crypto.decryptAES(conteudoCriptografado)); | |
} | |
/* Output | |
Chave 16bits: G3r0m3lcr1pt0666 | |
Vetor: RandomInitVector | |
Iniciando criptografia | |
Conteúdo criptografado: 0kYXE304L2lN2yVXbNCCAWqGiUPgvwlaQG2ooujkuRKSt52zYG0X7lIMepeFFO57 | |
Descriptografando... | |
Conteudo descriptografado: tipoQr=4park&valorPassagem=250&id4all=2345 | |
*/ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment