package com.reyun;


public class Algorithm {

	public native String rsaPrivateEncode(String plantext,String privatekey);

	public native String rsaPublicDecode(String ciphertext,String pubkey);

	public native String rsaEncode(String plantext,String pubkey);

	/**
	 * @param ciphertext
	 * @param privatekey
	 * @return
	 */
	public native String rsaDecode(String ciphertext,String privatekey);


	public native String sha1(String plantext);


	public native String aes256Encode(String plantext,String key);


	public native String aes256Decode(String ciphertext,String key);

    public native byte [] aes256EncodeB(byte [] data,byte [] key);

    public native byte [] aes256DecodeB(byte [] data,byte [] key);
}
