home *** CD-ROM | disk | FTP | other *** search
- package java.security;
-
- public abstract class Signer extends Identity {
- private PrivateKey privateKey;
-
- protected Signer() {
- }
-
- public Signer(String var1) {
- super(var1);
- }
-
- public Signer(String var1, IdentityScope var2) throws KeyManagementException {
- super(var1, var2);
- }
-
- public PrivateKey getPrivateKey() {
- ((Identity)this).check("get.private.key");
- return this.privateKey;
- }
-
- public final void setKeyPair(KeyPair var1) throws InvalidParameterException, KeyException {
- ((Identity)this).check("set.private.keypair");
- PublicKey var2 = var1.getPublic();
- PrivateKey var3 = var1.getPrivate();
- if (var2 != null && var3 != null) {
- ((Identity)this).setPublicKey(var2);
- this.privateKey = var3;
- } else {
- throw new InvalidParameterException();
- }
- }
-
- String printKeys() {
- String var1 = "";
- PublicKey var2 = ((Identity)this).getPublicKey();
- if (var2 != null && this.privateKey != null) {
- var1 = "\tpublic and private keys initialized";
- } else {
- var1 = "\tno keys";
- }
-
- return var1;
- }
-
- public String toString() {
- return "[Signer]" + super.toString();
- }
- }
-