2998N/A * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * Parameters for SSL/TLS key material generation. 0N/A * This class is used to initialize KeyGenerator of the type 0N/A * "TlsKeyMaterial". The keys returned by such KeyGenerators will be 0N/A * instances of {@link TlsKeyMaterialSpec}. 0N/A * <p>Instances of this class are immutable. 0N/A * @author Andreas Sterbenz 3002N/A * @deprecated Sun JDK internal use only --- WILL BE REMOVED in a future 0N/A * Constructs a new TlsKeyMaterialParameterSpec. 0N/A * @param masterSecret the master secret 0N/A * @param majorVersion the major number of the protocol version 0N/A * @param minorVersion the minor number of the protocol version 0N/A * @param clientRandom the client's random value 0N/A * @param serverRandom the server's random value 0N/A * @param cipherAlgorithm the algorithm name of the cipher keys to 0N/A * @param cipherKeyLength if 0, no cipher keys will be generated; 0N/A * otherwise, the length in bytes of cipher keys to be 0N/A * generated for domestic cipher suites; for cipher suites defined as 0N/A * exportable, the number of key material bytes to be generated; 0N/A * @param expandedCipherKeyLength 0 for domestic cipher suites; for 0N/A * exportable cipher suites the length in bytes of the key to be 0N/A * @param ivLength the length in bytes of the initialization vector 0N/A * to be generated, or 0 if no initialization vector is required 0N/A * @param macKeyLength the length in bytes of the MAC key to be generated 3002N/A * @param prfHashAlg the name of the TLS PRF hash algorithm to use. 3002N/A * Used only for TLS 1.2+. TLS1.1 and earlier use a fixed PRF. 3002N/A * @param prfHashLength the output length of the TLS PRF hash algorithm. 3002N/A * @param prfBlockSize the input block size of the TLS PRF hash algorithm. 0N/A * @throws NullPointerException if masterSecret, clientRandom, 0N/A * serverRandom, or cipherAlgorithm are null 0N/A * @throws IllegalArgumentException if the algorithm of masterSecret is 0N/A * not TlsMasterSecret, or if majorVersion or minorVersion are 0N/A * negative or larger than 255; or if cipherKeyLength, expandedKeyLength, 0N/A * ivLength, or macKeyLength are negative 0N/A * Returns the master secret. 0N/A * @return the master secret. 0N/A * Returns the major version number. 0N/A * @return the major version number. 0N/A * Returns the minor version number. 0N/A * @return the minor version number. 0N/A * Returns a copy of the client's random value. 0N/A * @return a copy of the client's random value. 0N/A * Returns a copy of the server's random value. 0N/A * @return a copy of the server's random value. 0N/A * Returns the cipher algorithm. 0N/A * @return the cipher algorithm. 0N/A * Returns the length in bytes of the encryption key to be generated. 0N/A * @return the length in bytes of the encryption key to be generated. 2998N/A * Returns the length in bytes of the expanded encryption key to be 2998N/A * generated. Returns zero if the expanded encryption key is not 2998N/A * supposed to be generated. 2998N/A * @return the length in bytes of the expanded encryption key to be 2998N/A // TLS v1.1 disables the exportable weak cipher suites. 2998N/A * Returns the length in bytes of the initialization vector to be 2998N/A * generated. Returns zero if the initialization vector is not 2998N/A * supposed to be generated. 2998N/A * @return the length in bytes of the initialization vector to be 2998N/A // TLS v1.1 or later uses an explicit IV to protect against 0N/A * Returns the length in bytes of the MAC key to be generated. 0N/A * @return the length in bytes of the MAC key to be generated. 3002N/A * Obtains the PRF hash algorithm to use in the PRF calculation. 3002N/A * @return the hash algorithm. 3002N/A * Obtains the length of the PRF hash algorithm. 3002N/A * @return the hash algorithm length. 3002N/A * Obtains the block size of the PRF hash algorithm. 3002N/A * @return the hash algorithm block size