equal
deleted
inserted
replaced
130 if (!(publicKey instanceof RSAPublicKey)) { |
130 if (!(publicKey instanceof RSAPublicKey)) { |
131 throw new InvalidKeyException("key must be RSAPublicKey"); |
131 throw new InvalidKeyException("key must be RSAPublicKey"); |
132 } |
132 } |
133 this.pubKey = (RSAPublicKey) isValid((RSAKey)publicKey); |
133 this.pubKey = (RSAPublicKey) isValid((RSAKey)publicKey); |
134 this.privKey = null; |
134 this.privKey = null; |
135 |
135 resetDigest(); |
136 } |
136 } |
137 |
137 |
138 // initialize for signing. See JCA doc |
138 // initialize for signing. See JCA doc |
139 @Override |
139 @Override |
140 protected void engineInitSign(PrivateKey privateKey) |
140 protected void engineInitSign(PrivateKey privateKey) |
151 } |
151 } |
152 this.privKey = (RSAPrivateKey) isValid((RSAKey)privateKey); |
152 this.privKey = (RSAPrivateKey) isValid((RSAKey)privateKey); |
153 this.pubKey = null; |
153 this.pubKey = null; |
154 this.random = |
154 this.random = |
155 (random == null? JCAUtil.getSecureRandom() : random); |
155 (random == null? JCAUtil.getSecureRandom() : random); |
|
156 resetDigest(); |
156 } |
157 } |
157 |
158 |
158 /** |
159 /** |
159 * Utility method for checking the key PSS parameters against signature |
160 * Utility method for checking the key PSS parameters against signature |
160 * PSS parameters. |
161 * PSS parameters. |