JXTA

net.jxta.impl.membership.pse
Interface PSEPeerSecurityEngine


public interface PSEPeerSecurityEngine

Provides algorithm support for PSE.


Method Summary
 PSEUtils.IssuerInfo generateCertificate(PSECredential credential)
          Generate a new service certificate.
 String getSignatureAlgorithm()
          Returns the default signature algorithm for this security engine.
 byte[] sign(String algorithm, PSECredential credential, InputStream bis)
          Cryptographically sign an input stream using the specified credential with the specified algorithm.
 boolean verify(String algorithm, PSECredential credential, byte[] signature, InputStream bis)
          Cryptographically verify a signature against an input stream using the specified credential with the specified algorithm.
 

Method Detail

sign

byte[] sign(String algorithm,
            PSECredential credential,
            InputStream bis)
            throws InvalidKeyException,
                   SignatureException,
                   IOException
Cryptographically sign an input stream using the specified credential with the specified algorithm.

Parameters:
algorithm - The signature algorithm to use.
credential - The credential which is signing the stream.
bis - The input stream to be signed.
Returns:
The resulting signature.
Throws:
InvalidKeyException
SignatureException
IOException

verify

boolean verify(String algorithm,
               PSECredential credential,
               byte[] signature,
               InputStream bis)
               throws InvalidKeyException,
                      SignatureException,
                      IOException
Cryptographically verify a signature against an input stream using the specified credential with the specified algorithm.

Parameters:
algorithm - The signature algorithm to use.
signature - The signature to be verified.
credential - The credential which is signing the stream.
bis - The input stream to be signed.
Returns:
true If the signature is valid otherwise false.
Throws:
InvalidKeyException
SignatureException
IOException

generateCertificate

PSEUtils.IssuerInfo generateCertificate(PSECredential credential)
                                        throws SecurityException
Generate a new service certificate.

Parameters:
credential - The credential which will be the issuer of the service certificate.
Throws:
SecurityException

getSignatureAlgorithm

String getSignatureAlgorithm()
Returns the default signature algorithm for this security engine.


JXSE