fix key size for native HMAC
This commit is contained in:
parent
fc4120cd0d
commit
c53b0cd811
|
@ -51,7 +51,7 @@ public class Crypto {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
hmacSHA512 = Signature.getInstance(Signature.ALG_HMAC_SHA_512, false);
|
hmacSHA512 = Signature.getInstance(Signature.ALG_HMAC_SHA_512, false);
|
||||||
hmacKey = (HMACKey) KeyBuilder.buildKey(KeyBuilder.TYPE_HMAC_TRANSIENT_DESELECT, KEY_SECRET_SIZE, false);
|
hmacKey = (HMACKey) KeyBuilder.buildKey(KeyBuilder.TYPE_HMAC_TRANSIENT_DESELECT, KeyBuilder.LENGTH_AES_256, false);
|
||||||
} catch (CryptoException e) {
|
} catch (CryptoException e) {
|
||||||
hmacSHA512 = null;
|
hmacSHA512 = null;
|
||||||
hmacBlock = JCSystem.makeTransientByteArray(HMAC_BLOCK_SIZE, JCSystem.CLEAR_ON_RESET);
|
hmacBlock = JCSystem.makeTransientByteArray(HMAC_BLOCK_SIZE, JCSystem.CLEAR_ON_RESET);
|
||||||
|
|
Loading…
Reference in New Issue