Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public String encrypt(String Data, String pKey) throws Exception
- {
- Key key = generateKey(pKey);
- Cipher c = Cipher.getInstance(ALGO);
- c.init(Cipher.ENCRYPT_MODE, key);
- byte[] encVal = c.doFinal(Data.getBytes("UTF-8"));
- return new BASE64Encoder().encode(encVal);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement