public class Ciphers extends Object
| 构造器和说明 |
|---|
Ciphers() |
| 限定符和类型 | 方法和说明 |
|---|---|
static Cipher |
createCipher(String algorithmTransformation,
Provider provider,
int operateMode,
Certificate certificate,
SecureRandom secureRandom) |
static Cipher |
createCipher(String algorithmTransformation,
Provider provider,
int operateMode,
Key key,
AlgorithmParameterSpec parameterSpec,
SecureRandom secureRandom) |
static Cipher |
createCipher(String algorithmTransformation,
Provider provider,
int operateMode,
Key key,
AlgorithmParameters parameters,
SecureRandom secureRandom) |
static Cipher |
createCipher(String algorithmTransformation,
Provider provider,
int operateMode,
Key key,
SecureRandom secureRandom) |
static Cipher |
createEmptyCipher(String algorithmTransformation,
Provider provider) |
static byte[] |
decrypt(Cipher cipher,
byte[] data) |
static byte[] |
encrypt(Cipher cipher,
byte[] data) |
public static Cipher createEmptyCipher(@NonNull String algorithmTransformation, @Nullable Provider provider) throws NoSuchAlgorithmException, NoSuchPaddingException
public static Cipher createCipher(@NonNull String algorithmTransformation, @Nullable Provider provider, int operateMode, Key key, SecureRandom secureRandom) throws NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException
public static Cipher createCipher(@NonNull String algorithmTransformation, @Nullable Provider provider, int operateMode, Key key, AlgorithmParameterSpec parameterSpec, SecureRandom secureRandom) throws NoSuchAlgorithmException, NoSuchProviderException, NoSuchPaddingException, InvalidKeyException, InvalidAlgorithmParameterException
public static Cipher createCipher(@NonNull String algorithmTransformation, @Nullable Provider provider, int operateMode, Key key, AlgorithmParameters parameters, SecureRandom secureRandom) throws NoSuchAlgorithmException, NoSuchProviderException, NoSuchPaddingException, InvalidKeyException, InvalidAlgorithmParameterException
public static Cipher createCipher(@NonNull String algorithmTransformation, @Nullable Provider provider, int operateMode, Certificate certificate, SecureRandom secureRandom) throws NoSuchAlgorithmException, NoSuchProviderException, NoSuchPaddingException, InvalidKeyException
public static byte[] encrypt(Cipher cipher, byte[] data) throws BadPaddingException, IllegalBlockSizeException
public static byte[] decrypt(Cipher cipher, byte[] data) throws BadPaddingException, IllegalBlockSizeException
Copyright © 2020. All rights reserved.