Path: blob/master/src/java.base/share/classes/sun/security/internal/interfaces/TlsMasterSecret.java
41161 views
/*1* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package sun.security.internal.interfaces;2627import javax.crypto.SecretKey;2829/**30* An SSL/TLS master secret key. It is a <code>SecretKey</code> that optionally31* contains protocol version information that is used to detect version32* rollback attacks during the SSL/TLS handshake.33*34* <p>Implementation of this interface are returned by the35* <code>generateKey()</code> method of KeyGenerators of the type36* "TlsMasterSecret".37*38* @since 1.639* @author Andreas Sterbenz40* @deprecated Sun JDK internal use only --- WILL BE REMOVED in a future41* release.42*/43@Deprecated44public interface TlsMasterSecret extends SecretKey {4546/***47* @deprecated A {@code serialVersionUID} field in an interface is48* ineffectual. Do not use; no replacement.49*/50@Deprecated51@SuppressWarnings("serial")52@java.io.Serial53public static final long serialVersionUID = -461748105810469773L;5455/**56* Returns the major version number encapsulated in the premaster secret57* this master secret was derived from, or -1 if it is not available.58*59* <p>This information will only usually only be available when RSA60* was used as the key exchange algorithm.61*62* @return the major version number, or -1 if it is not available63*/64public int getMajorVersion();6566/**67* Returns the minor version number encapsulated in the premaster secret68* this master secret was derived from, or -1 if it is not available.69*70* <p>This information will only usually only be available when RSA71* was used as the key exchange algorithm.72*73* @return the major version number, or -1 if it is not available74*/75public int getMinorVersion();7677}787980