JAVA로 구현한 RSA 프로그래밍 소스
- 최초 등록일
- 2005.07.03
- 최종 저작일
- 2005.07
- 3페이지/ 한컴오피스
- 가격 1,000원
소개글
java로 제가 직접 구현했습니다.
참고로 A+ 맞았구요..ㅎㅎ
컴파일 실행환경
본문 소스에 애플릿화일소스까지 첨부했습니다.
애플릿화일만 더블클릭하시면 실행됩니다..ㅎㅎ
본문내용
import java.applet.*;
import java.math.*;
import java.util.Random;
import java.awt.*;
import java.awt.event.*;
public class RSA extends Applet implements ActionListener{
Button generateKey=new Button("Generate Key");
Button encryption=new Button("Encryption");
Button decryption=new Button("Decryption");
Button reset=new Button(" Reset ");
TextArea gKey=new TextArea(4,100);
TextArea plainText=new TextArea(2,70);
TextArea encryptTextArea=new TextArea(2,70);
TextArea decryptTextArea=new TextArea(2,70); //----------------------------------애플릿 컴포넌트 선언
BigInteger w = new BigInteger("1");
Random randomKey,randomKey1,randomKey2;
BigInteger rannum1,rannum2,rannum3;
BigInteger num,num1,num2,num3,gcd,numModIn,plainTextIn,ciperTextIn,plainTextMod;
String temp;
int inNum; //-----------------------------------------------------------------변수 선언
public void init(){
add(generateKey);
add(gKey);
gKey.setText("Generate Key를 클릭하세요.");
gKey.setBackground(Color.pink);
add(plainText);
plainText.setText("Plain-text를 입력하세요.");
plainText.setBackground(Color.yellow);
add(encryption);
add(encryptTextArea);
참고 자료
없음