File tree Expand file tree Collapse file tree
src/java.base/share/classes/com/sun/crypto/provider Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -47,7 +47,8 @@ final class PBES1Core {
4747 private final MessageDigest md ;
4848 private final String algo ;
4949 private byte [] salt = null ;
50- private int iCount = 10 ;
50+ // RFC 8018 and NIST SP 800-132 sec 5.2 recommend 1000 as the minimum
51+ private int iCount = PKCS12PBECipherCore .DEFAULT_COUNT ;
5152
5253 /**
5354 * Creates an instance of PBE Cipher using the specified CipherSpi
Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 2003, 2022 , Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 2003, 2025 , Oracle and/or its affiliates. All rights reserved.
33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44 *
55 * This code is free software; you can redistribute it and/or modify it
@@ -53,7 +53,7 @@ final class PKCS12PBECipherCore {
5353 private int iCount = 0 ;
5454
5555 private static final int DEFAULT_SALT_LENGTH = 20 ;
56- private static final int DEFAULT_COUNT = 1024 ;
56+ static final int DEFAULT_COUNT = 1024 ;
5757
5858 static final int CIPHER_KEY = 1 ;
5959 static final int CIPHER_IV = 2 ;
You can’t perform that action at this time.
0 commit comments