public class CypherAES256 extends Object implements CypherInterface
Modifier and Type | Field and Description |
---|---|
static int |
AES_KEYLEN |
static String |
CHAR_ENCODING |
static String |
CYPHER_ALGO |
static String |
CYPHER_ID |
static String |
CYPHER_KEY_ALGO |
static int |
ITERATIONS |
static int |
IVLEN |
static String |
KEYGEN_ALGO |
static int |
KEYLEN |
Constructor and Description |
---|
CypherAES256() |
Modifier and Type | Method and Description |
---|---|
byte[] |
calculateHMAC(byte[] key,
byte[] data) |
byte[] |
decrypt(byte[] encryptedData,
String password) |
void |
decrypt(OutputStream decodedStream,
byte[] encryptedData,
String password) |
byte[] |
decryptAES(byte[] cypher,
byte[] key,
byte[] iv) |
byte[] |
encrypt(byte[] data,
String password) |
void |
encrypt(OutputStream encodedStream,
byte[] data,
String password) |
byte[] |
encryptAES(byte[] cleartext,
byte[] key,
byte[] iv) |
String |
infoLine() |
byte[] |
pad(byte[] cleartext) |
int |
paddingLength(byte[] decrypted) |
byte[] |
unpad(byte[] decrypted) |
boolean |
verifyHMAC(byte[] hmac,
byte[] key,
byte[] data) |
public static final String CYPHER_ID
public static final int AES_KEYLEN
public static final String CHAR_ENCODING
public static final String KEYGEN_ALGO
public static final String CYPHER_KEY_ALGO
public static final String CYPHER_ALGO
public static final int KEYLEN
public static final int IVLEN
public static final int ITERATIONS
public byte[] calculateHMAC(byte[] key, byte[] data) throws IOException
IOException
public boolean verifyHMAC(byte[] hmac, byte[] key, byte[] data) throws IOException
IOException
public int paddingLength(byte[] decrypted)
public byte[] unpad(byte[] decrypted)
public byte[] pad(byte[] cleartext) throws IOException
IOException
public byte[] decryptAES(byte[] cypher, byte[] key, byte[] iv) throws IOException
IOException
public byte[] encryptAES(byte[] cleartext, byte[] key, byte[] iv) throws IOException
IOException
public byte[] decrypt(byte[] encryptedData, String password) throws IOException
decrypt
in interface CypherInterface
IOException
public void decrypt(OutputStream decodedStream, byte[] encryptedData, String password) throws IOException
decrypt
in interface CypherInterface
IOException
public void encrypt(OutputStream encodedStream, byte[] data, String password) throws IOException
encrypt
in interface CypherInterface
IOException
public String infoLine()
infoLine
in interface CypherInterface
public byte[] encrypt(byte[] data, String password) throws IOException
encrypt
in interface CypherInterface
IOException
Copyright © 2023 Frank!Framework. All rights reserved.