Here you can find the source of encrypt(byte[] source)
public static byte[] encrypt(byte[] source) throws Throwable
//package com.java2s; import javax.crypto.Cipher; public class Main { private static Cipher encryptCipher; public static byte[] encrypt(byte[] source) throws Throwable { if (source == null || source.length < 1) { return null; }/* ww w . j a v a2 s . co m*/ return encryptCipher.doFinal(source); } }