
public class HmacSha256 extends KeyObject
| Constructor and Description |
|---|
HmacSha256() |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
crypt(byte[] plaintext)
Crypt one array of bytes and returns the crypted array of bytes
|
byte[] |
decrypt(byte[] ciphertext)
Decrypt an array of bytes and returns the uncrypted array of bytes
|
String |
getAlgorithm() |
String |
getFileExtension() |
String |
getInstance() |
int |
getKeySize() |
static void |
main(String[] args)
Generates a HmacSha256 key and saves it into the file given as argument
|
Cipher |
toCrypt()
Returns a cipher for encryption associated with the key
|
Cipher |
toDecrypt()
Returns a cipher for decryption associated with the key
|
crypt, cryptToHex, cryptToHex, decodeHex, decryptHexFile, decryptHexInBytes, decryptHexInBytes, decryptHexInString, decryptHexInString, decryptInString, encodeHex, generateKey, getSecretKey, getSecretKeyInBytes, keyReady, saveSecretKey, setSecretKey, setSecretKey, setSecretKeypublic static final String EXTENSION
public String getAlgorithm()
getAlgorithm in class KeyObjectpublic String getInstance()
getInstance in class KeyObjectpublic int getKeySize()
getKeySize in class KeyObjectpublic String getFileExtension()
getFileExtension in class KeyObjectpublic Cipher toCrypt()
KeyObjectpublic byte[] crypt(byte[] plaintext)
throws Exception
KeyObjectpublic Cipher toDecrypt()
KeyObjectpublic byte[] decrypt(byte[] ciphertext)
throws Exception
KeyObjectpublic static void main(String[] args)
args - Copyright © 2009–2020 Waarp. All rights reserved.