src/java.base/share/classes/sun/security/rsa/RSAPrivateKeyImpl.java
branchdatagramsocketimpl-branch
changeset 58678 9cf78a70fa4f
parent 50204 3195a713e24d
child 58679 9c3209ff7550
equal deleted inserted replaced
58677:13588c901957 58678:9cf78a70fa4f
     1 /*
     1 /*
     2  * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    50  * @since   1.5
    50  * @since   1.5
    51  * @author  Andreas Sterbenz
    51  * @author  Andreas Sterbenz
    52  */
    52  */
    53 public final class RSAPrivateKeyImpl extends PKCS8Key implements RSAPrivateKey {
    53 public final class RSAPrivateKeyImpl extends PKCS8Key implements RSAPrivateKey {
    54 
    54 
       
    55     @java.io.Serial
    55     private static final long serialVersionUID = -33106691987952810L;
    56     private static final long serialVersionUID = -33106691987952810L;
    56 
    57 
    57     private final BigInteger n;         // modulus
    58     private final BigInteger n;         // modulus
    58     private final BigInteger d;         // private exponent
    59     private final BigInteger d;         // private exponent
    59 
    60 
    60     // optional parameters associated with this RSA key
    61     // optional parameters associated with this RSA key
    61     // specified in the encoding of its AlgorithmId.
    62     // specified in the encoding of its AlgorithmId.
    62     // must be null for "RSA" keys.
    63     // must be null for "RSA" keys.
       
    64     @SuppressWarnings("serial") // Not statically typed as Serializable
    63     private final AlgorithmParameterSpec keyParams;
    65     private final AlgorithmParameterSpec keyParams;
    64 
    66 
    65     /**
    67     /**
    66      * Construct a key from its components. Used by the
    68      * Construct a key from its components. Used by the
    67      * RSAKeyFactory and the RSAKeyPairGenerator.
    69      * RSAKeyFactory and the RSAKeyPairGenerator.