org.rhq.enterprise.server.plugins.rhnhosted.certificate
Class PublicKeyRing
java.lang.Object
org.rhq.enterprise.server.plugins.rhnhosted.certificate.PublicKeyRing
public class PublicKeyRing
- extends Object
A GPG public keyring.
|
Method Summary |
boolean |
verifySignature(String message,
String asciiSig)
Verify that asciiSig is a valid signature for
message using this key ring. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PublicKeyRing
public PublicKeyRing(InputStream keyRingStream)
throws IOException,
KeyException
- Read the key ring from
keyRingStream.
- Parameters:
keyRingStream - the stream from which the key ring will be read
- Throws:
IOException - if reading the stream fails
KeyException - if the keyring can not be created from the stream
verifySignature
public boolean verifySignature(String message,
String asciiSig)
throws SignatureException
- Verify that
asciiSig is a valid signature for
message using this key ring.
- Parameters:
message - the cleartext messageasciiSig - the ASCII armored sigature
- Returns:
true if the signature was generated from
message using one of the private keys corresponding to the
public keys on this key ring
- Throws:
SignatureException - if processing hte signature fails
Copyright © 2008-2011 Red Hat, Inc.. All Rights Reserved.