jdk/src/share/classes/com/sun/crypto/provider/RSACipher.java
changeset 10336 0bb1999251f8
parent 5506 202f599c92aa
child 16909 78a1749a43e2
equal deleted inserted replaced
10335:3c7eda3ab2f5 10336:0bb1999251f8
     1 /*
     1 /*
     2  * Copyright (c) 2003, 2009, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2003, 2011, 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
   225             throws InvalidKeyException, InvalidAlgorithmParameterException {
   225             throws InvalidKeyException, InvalidAlgorithmParameterException {
   226         if (params == null) {
   226         if (params == null) {
   227             init(opmode, key, random, null);
   227             init(opmode, key, random, null);
   228         } else {
   228         } else {
   229             try {
   229             try {
   230                 OAEPParameterSpec spec = (OAEPParameterSpec)
   230                 OAEPParameterSpec spec =
   231                     params.getParameterSpec(OAEPParameterSpec.class);
   231                         params.getParameterSpec(OAEPParameterSpec.class);
   232                 init(opmode, key, random, spec);
   232                 init(opmode, key, random, spec);
   233             } catch (InvalidParameterSpecException ipse) {
   233             } catch (InvalidParameterSpecException ipse) {
   234                 InvalidAlgorithmParameterException iape =
   234                 InvalidAlgorithmParameterException iape =
   235                     new InvalidAlgorithmParameterException("Wrong parameter");
   235                     new InvalidAlgorithmParameterException("Wrong parameter");
   236                 iape.initCause(ipse);
   236                 iape.initCause(ipse);