src/share/classes/java/security/spec/PSSParameterSpec.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2001, 2012, 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2001, 2013, 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 89,106 **** * @since 1.5 */ public static final PSSParameterSpec DEFAULT = new PSSParameterSpec(); /** ! * Constructs a new <code>PSSParameterSpec</code> as defined in * the PKCS #1 standard using the default values. */ private PSSParameterSpec() { } /** ! * Creates a new <code>PSSParameterSpec</code> as defined in * the PKCS #1 standard using the specified message digest, * mask generation function, parameters for mask generation * function, salt length, and trailer field values. * * @param mdName the algorithm name of the hash function. --- 89,106 ---- * @since 1.5 */ public static final PSSParameterSpec DEFAULT = new PSSParameterSpec(); /** ! * Constructs a new {@code PSSParameterSpec} as defined in * the PKCS #1 standard using the default values. */ private PSSParameterSpec() { } /** ! * Creates a new {@code PSSParameterSpec} as defined in * the PKCS #1 standard using the specified message digest, * mask generation function, parameters for mask generation * function, salt length, and trailer field values. * * @param mdName the algorithm name of the hash function.
*** 109,122 **** * @param mgfSpec the parameters for the mask generation * function. If null is specified, null will be returned by * getMGFParameters(). * @param saltLen the length of salt. * @param trailerField the value of the trailer field. ! * @exception NullPointerException if <code>mdName</code>, ! * or <code>mgfName</code> is null. ! * @exception IllegalArgumentException if <code>saltLen</code> ! * or <code>trailerField</code> is less than 0. * @since 1.5 */ public PSSParameterSpec(String mdName, String mgfName, AlgorithmParameterSpec mgfSpec, int saltLen, int trailerField) { --- 109,122 ---- * @param mgfSpec the parameters for the mask generation * function. If null is specified, null will be returned by * getMGFParameters(). * @param saltLen the length of salt. * @param trailerField the value of the trailer field. ! * @exception NullPointerException if {@code mdName}, ! * or {@code mgfName} is null. ! * @exception IllegalArgumentException if {@code saltLen} ! * or {@code trailerField} is less than 0. * @since 1.5 */ public PSSParameterSpec(String mdName, String mgfName, AlgorithmParameterSpec mgfSpec, int saltLen, int trailerField) {
*** 141,157 **** this.saltLen = saltLen; this.trailerField = trailerField; } /** ! * Creates a new <code>PSSParameterSpec</code> * using the specified salt length and other default values as * defined in PKCS#1. * * @param saltLen the length of salt in bits to be used in PKCS#1 * PSS encoding. ! * @exception IllegalArgumentException if <code>saltLen</code> is * less than 0. */ public PSSParameterSpec(int saltLen) { if (saltLen < 0) { throw new IllegalArgumentException("negative saltLen value: " + --- 141,157 ---- this.saltLen = saltLen; this.trailerField = trailerField; } /** ! * Creates a new {@code PSSParameterSpec} * using the specified salt length and other default values as * defined in PKCS#1. * * @param saltLen the length of salt in bits to be used in PKCS#1 * PSS encoding. ! * @exception IllegalArgumentException if {@code saltLen} is * less than 0. */ public PSSParameterSpec(int saltLen) { if (saltLen < 0) { throw new IllegalArgumentException("negative saltLen value: " +