Android AES Encrypt encrypt(byte[] source)

Here you can find the source of encrypt(byte[] source)

Description

encrypt

Declaration

public static byte[] encrypt(byte[] source) throws Throwable 

Method Source Code

//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);
    }
}

Related

  1. encrypt(byte[] key, byte[] src)
  2. encrypt(byte[] raw, byte[] clear)
  3. encrypt(byte[] raw, byte[] clear)
  4. encrypt(byte[] raw, byte[] clear)
  5. encrypt(byte[] raw, byte[] clear)
  6. encryptBase64(String content, String key)
  7. encryptBase64(byte[] source)
  8. encryptBytes(String seed, byte[] cleartext)
  9. encryptBytes(byte[] data, byte[] key)