org.rdfcontext.signing
Class LiveDBinSignature

java.lang.Object
  extended byorg.rdfcontext.signing.LiveDBinSignature
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
PGPLiveSignature, X509LiveSignature

public abstract class LiveDBinSignature
extends java.lang.Object
implements java.io.Serializable

A LiveBDinSignature is capable of signing data, it requires a private key as well as a public one.

See Also:
Serialized Form

Constructor Summary
LiveDBinSignature()
           
 
Method Summary
 void checkPublicAvailability(IURLResolver urlresolver)
          Deprecated. this method should no more be used to check the availability, it should be done at a upper level...
 java.net.URL getCertificateURL()
           
abstract  java.lang.String getKindOfCertificate()
           
 void setCertificateURL(java.net.URL url)
          Sets the location (URL) of the certificate used to sign data.
 java.lang.String sign(java.lang.String dataToSign)
          Sign a data string and return the base64 string signature value
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LiveDBinSignature

public LiveDBinSignature()
Method Detail

sign

public java.lang.String sign(java.lang.String dataToSign)
                      throws java.security.SignatureException
Sign a data string and return the base64 string signature value

Parameters:
dataToSign -
Returns:
the encode 64 string signature
Throws:
java.security.SignatureException

checkPublicAvailability

public void checkPublicAvailability(IURLResolver urlresolver)
                             throws NoPublicAvailabilityException
Deprecated. this method should no more be used to check the availability, it should be done at a upper level...

Checks that the Certificate URL (given in the constructor) is actually resolvable and contentwise identical to the local certificate

Parameters:
urlresolver - a URLResolver or null to use the default resolver
Throws:
NoPublicAvailabilityException
See Also:
DefaultURLResolver

getCertificateURL

public java.net.URL getCertificateURL()
Returns:
Returns the location (URL) of the certificate used to sign data

setCertificateURL

public void setCertificateURL(java.net.URL url)
Sets the location (URL) of the certificate used to sign data. NOTE: this method must be used to initialize the certificate location, this will be appended to the RDF data model.

Parameters:
url -

getKindOfCertificate

public abstract java.lang.String getKindOfCertificate()
Returns:
the kind of certificate used