jdk/src/jdk.crypto.mscapi/windows/classes/sun/security/mscapi/RSAPrivateKey.java
changeset 40389 c6df8bba0b71
parent 25859 3317bb8137f4
equal deleted inserted replaced
40320:2e83d21d78cd 40389:c6df8bba0b71
     1 /*
     1 /*
     2  * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2005, 2016, 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
    40     /**
    40     /**
    41      * Construct an RSAPrivateKey object.
    41      * Construct an RSAPrivateKey object.
    42      */
    42      */
    43     RSAPrivateKey(long hCryptProv, long hCryptKey, int keyLength)
    43     RSAPrivateKey(long hCryptProv, long hCryptKey, int keyLength)
    44     {
    44     {
    45         super(hCryptProv, hCryptKey, keyLength);
    45         super(new NativeHandles(hCryptProv, hCryptKey), keyLength);
       
    46     }
       
    47 
       
    48     /**
       
    49      * Construct an RSAPrivateKey object.
       
    50      */
       
    51     RSAPrivateKey(NativeHandles handles, int keyLength)
       
    52     {
       
    53         super(handles, keyLength);
    46     }
    54     }
    47 
    55 
    48     /**
    56     /**
    49      * Returns the standard algorithm name for this key. For
    57      * Returns the standard algorithm name for this key. For
    50      * example, "RSA" would indicate that this key is a RSA key.
    58      * example, "RSA" would indicate that this key is a RSA key.
    61     }
    69     }
    62 
    70 
    63     public String toString()
    71     public String toString()
    64     {
    72     {
    65         return "RSAPrivateKey [size=" + keyLength + " bits, type=" +
    73         return "RSAPrivateKey [size=" + keyLength + " bits, type=" +
    66             getKeyType(hCryptKey) + ", container=" +
    74             getKeyType(handles.hCryptKey) + ", container=" +
    67             getContainerName(hCryptProv) + "]";
    75             getContainerName(handles.hCryptProv) + "]";
    68     }
    76     }
    69 
    77 
    70     // This class is not serializable
    78     // This class is not serializable
    71     private void writeObject(java.io.ObjectOutputStream out)
    79     private void writeObject(java.io.ObjectOutputStream out)
    72         throws java.io.IOException {
    80         throws java.io.IOException {