mirror of
https://github.com/openjdk/jdk.git
synced 2026-04-27 15:20:53 +00:00
8371935: Enhance key generation
Reviewed-by: rhalade, jnibedita, ahgross, ascarpino, weijun
This commit is contained in:
parent
99e854c53f
commit
9866650b64
@ -47,7 +47,8 @@ final class PBES1Core {
|
||||
private final MessageDigest md;
|
||||
private final String algo;
|
||||
private byte[] salt = null;
|
||||
private int iCount = 10;
|
||||
// RFC 8018 and NIST SP 800-132 sec 5.2 recommend 1000 as the minimum
|
||||
private int iCount = PKCS12PBECipherCore.DEFAULT_COUNT;
|
||||
|
||||
// utility method for checking weak salts of PBEWithMD5AndTripleDES cipher
|
||||
private static boolean isWeak(byte[] s) {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -53,7 +53,7 @@ final class PKCS12PBECipherCore {
|
||||
private int iCount = 0;
|
||||
|
||||
private static final int DEFAULT_SALT_LENGTH = 20;
|
||||
private static final int DEFAULT_COUNT = 1024;
|
||||
static final int DEFAULT_COUNT = 1024;
|
||||
|
||||
static final int CIPHER_KEY = 1;
|
||||
static final int CIPHER_IV = 2;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user