01: package org.bouncycastle.crypto.params;
02:
03: import org.bouncycastle.crypto.CipherParameters;
04:
05: import java.math.BigInteger;
06:
07: public class RSABlindingParameters implements CipherParameters {
08: private RSAKeyParameters publicKey;
09: private BigInteger blindingFactor;
10:
11: public RSABlindingParameters(RSAKeyParameters publicKey,
12: BigInteger blindingFactor) {
13: if (publicKey instanceof RSAPrivateCrtKeyParameters) {
14: throw new IllegalArgumentException(
15: "RSA parameters should be for a public key");
16: }
17:
18: this .publicKey = publicKey;
19: this .blindingFactor = blindingFactor;
20: }
21:
22: public RSAKeyParameters getPublicKey() {
23: return publicKey;
24: }
25:
26: public BigInteger getBlindingFactor() {
27: return blindingFactor;
28: }
29: }
|