Created
July 2, 2010 05:31
-
-
Save johobemax/460974 to your computer and use it in GitHub Desktop.
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 Enc | |
{ | |
public static void main(String[] args) | |
{ | |
int data = Integer.parseInt(args[0]); | |
int key1 = Integer.parseInt(args[1]); | |
int key2 = Integer.parseInt(args[2]); | |
int enc = data ^ key1; | |
System.out.println("encode=>"+enc); | |
int dec = enc ^ key2; | |
System.out.println("decode=>"+dec); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
XORを使った暗号化のサンプルプログラム。