public final class SymCipherCTR extends java.lang.Object implements ISymCipher
| Constructor and Description |
|---|
SymCipherCTR() |
| Modifier and Type | Method and Description |
|---|---|
int |
encryptAES1(byte[] from,
int ifrom,
byte[] to,
int ito,
int len) |
int |
encryptAES2(byte[] buff) |
byte[] |
getKeys()
Returns the currently used key(s) for encryption.
|
static void |
main(java.lang.String[] argv) |
int |
setEncryptionKeyAES(byte[] key)
Sets the AES encryption key to the value in the key buffer.
|
int |
setEncryptionKeyAES(byte[] key,
int offset,
int len) |
int |
setEncryptionKeysAES(byte[] keys)
Set both keys to different value, if keys.length==2* KEY_SIZe, else set
both keys to the same value
|
void |
setIV2(byte[] buff) |
java.lang.String |
toString() |
public java.lang.String toString()
toString in class java.lang.Objectpublic int setEncryptionKeyAES(byte[] key)
ISymCiphersetEncryptionKeyAES in interface ISymCipherpublic int setEncryptionKeyAES(byte[] key,
int offset,
int len)
setEncryptionKeyAES in interface ISymCipherkey - byte[]offset - intlen - int if len==16 --> only the key is set; if len==32 --> key and
IV is setpublic int setEncryptionKeysAES(byte[] keys)
setEncryptionKeysAES in interface ISymCipherkeys - byte[]public byte[] getKeys()
getKeys in interface ISymCipherpublic void setIV2(byte[] buff)
setIV2 in interface ISymCipherpublic int encryptAES1(byte[] from,
int ifrom,
byte[] to,
int ito,
int len)
encryptAES1 in interface ISymCipherpublic int encryptAES2(byte[] buff)
encryptAES2 in interface ISymCipherpublic static void main(java.lang.String[] argv)
Copyright © 2023. All rights reserved.