01: // Copyright (c) 1999-2004 Brian Wellington (bwelling@xbill.org)
02:
03: package org.xbill.DNS.security;
04:
05: import java.math.*;
06: import java.security.interfaces.*;
07:
08: /**
09: * A stub implementation of an RSA public key
10: *
11: * @author Brian Wellington
12: */
13:
14: class RSAPubKey implements RSAPublicKey {
15:
16: private BigInteger Modulus, Exponent;
17:
18: /** Create an RSA public key from its parts */
19: public RSAPubKey(BigInteger modulus, BigInteger exponent) {
20: Modulus = modulus;
21: Exponent = exponent;
22: }
23:
24: /** Obtain the modulus of an RSA public key */
25: public BigInteger getModulus() {
26: return Modulus;
27: }
28:
29: /** Obtain the exponent of an RSA public key */
30: public BigInteger getPublicExponent() {
31: return Exponent;
32: }
33:
34: /** Obtain the algorithm of an RSA public key */
35: public String getAlgorithm() {
36: return "RSA";
37: }
38:
39: /** Obtain the format of an RSA public key (unimplemented) */
40: public String getFormat() {
41: return null;
42: }
43:
44: /** Obtain the encoded representation of an RSA public key (unimplemented) */
45: public byte[] getEncoded() {
46: return null;
47: }
48:
49: }
|