< prev index next >

src/jdk.crypto.mscapi/windows/classes/sun/security/mscapi/RSAPublicKey.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2005, 2016, 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) 2005, 2018, 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
*** 28,37 **** --- 28,38 ---- import java.math.BigInteger; import java.security.KeyException; import java.security.KeyRep; import java.security.ProviderException; + import sun.security.rsa.RSAUtil.KeyType; import sun.security.rsa.RSAPublicKeyImpl; /** * The handle for an RSA public key using the Microsoft Crypto API. *
*** 163,174 **** public byte[] getEncoded() { if (encoding == null) { try { ! encoding = new RSAPublicKeyImpl(getModulus(), ! getPublicExponent()).getEncoded(); } catch (KeyException e) { // ignore } } --- 164,175 ---- public byte[] getEncoded() { if (encoding == null) { try { ! encoding = RSAPublicKeyImpl.newKey(KeyType.RSA, null, ! getModulus(), getPublicExponent()).getEncoded(); } catch (KeyException e) { // ignore } }
< prev index next >