equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2005, 2012, 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 |
288 } |
288 } |
289 privateKey = (sun.security.mscapi.RSAPrivateKey) key; |
289 privateKey = (sun.security.mscapi.RSAPrivateKey) key; |
290 |
290 |
291 // Check against the local and global values to make sure |
291 // Check against the local and global values to make sure |
292 // the sizes are ok. Round up to nearest byte. |
292 // the sizes are ok. Round up to nearest byte. |
293 RSAKeyFactory.checkKeyLengths(((privateKey.bitLength() + 7) & ~7), |
293 RSAKeyFactory.checkKeyLengths(((privateKey.length() + 7) & ~7), |
294 null, RSAKeyPairGenerator.KEY_SIZE_MIN, |
294 null, RSAKeyPairGenerator.KEY_SIZE_MIN, |
295 RSAKeyPairGenerator.KEY_SIZE_MAX); |
295 RSAKeyPairGenerator.KEY_SIZE_MAX); |
296 |
296 |
297 this.publicKey = null; |
297 this.publicKey = null; |
298 resetDigest(); |
298 resetDigest(); |