package com.sec.ax.restful.crypt.aes;

import org.apache.log4j.Level;
import org.apache.log4j.Logger;

import com.sec.ax.restful.crypt.AxCryptException;

import junit.framework.TestCase;

/**
 *
 * @author heesik.jeon
 *
 */

public class AxCryptTest extends TestCase {
	
	private Logger logger = Logger.getLogger(this.getClass());
	
	public AxCryptTest() {
		logger.setLevel(Level.DEBUG);
	}
	
	public void testDecrypt() {
		
		try {
			
			String encrypted = "yhAGrcZInqeKNvMiLiBugeIT/Sb/4ldr8YMLaL0OrRmvLc/pHJ8YZTda0R63HRyC";
			String decrypted = AxCrypt.decrypt("Vvb7oruYPkOHrEwoTVnXtw==", encrypted);
			
			logger.debug(encrypted);
			logger.debug(decrypted);
			
		} catch (AxCryptException e) {
			fail(e.toString());
		}
		
	}

}

@@ -407,24 +407,336 @@
 G);%0D%0A%09%7D%0D%0A%09%0D%0A
+%09public void testEncrypt() %7B%0D%0A%09%09%0D%0A%09%09try %7B%0D%0A%09%09%09%0D%0A%09%09%09String plain = %22%EB%8C%80%ED%95%9C%EB%AF%BC%EA%B5%AD Korea %E9%9F%93%E5%9C%8B  ~!@#$%25%5E&*()_+%7C%22;%0D%0A%09%09%09String encrypted = AxCrypt.encrypt(%22Vvb7oruYPkOHrEwoTVnXtw==%22, plain);%0D%0A%09%09%09%0D%0A%09%09%09logger.debug(plain);%0D%0A%09%09%09logger.debug(encrypted);%0D%0A%09%09%09%0D%0A%09%09%7D catch (AxCryptException e) %7B%0D%0A%09%09%09fail(e.toString());%0D%0A%09%09%7D%0D%0A%09%09%0D%0A%09%7D%0D%0A%0D%0A
 %09public void

Add TestCase to encrypt text