public class SymKey extends Object
Constructor and Description |
---|
SymKey() |
Modifier and Type | Method and Description |
---|---|
static Key |
buildKey(String algname,
byte[] enc,
int off,
int len) |
static byte[] |
decrypt(Key key,
AlgorithmParameters algp,
byte[] ciphertxt,
int off,
int len) |
static byte[] |
decryptPBE(char[] passwd,
byte[] ciphertxt,
int off,
int len) |
static byte[] |
encrypt(Key key,
AlgorithmParameters algp,
byte[] plaintxt,
int off,
int len) |
static byte[] |
encryptPBE(char[] passwd,
byte[] plaintxt,
int off,
int len) |
static Key |
generateKey(String algname,
int keysize) |
public static Key generateKey(String algname, int keysize) throws NoSuchAlgorithmException
NoSuchAlgorithmException
public static byte[] encrypt(Key key, AlgorithmParameters algp, byte[] plaintxt, int off, int len) throws GeneralSecurityException
GeneralSecurityException
public static byte[] decrypt(Key key, AlgorithmParameters algp, byte[] ciphertxt, int off, int len) throws GeneralSecurityException
GeneralSecurityException
public static byte[] encryptPBE(char[] passwd, byte[] plaintxt, int off, int len) throws GeneralSecurityException, UnsupportedEncodingException
public static byte[] decryptPBE(char[] passwd, byte[] ciphertxt, int off, int len) throws GeneralSecurityException, UnsupportedEncodingException
Copyright 2010-2018 Grey Software (Yusef Badri). All Rights Reserved.