All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class is.logi.crypto.sign.Signature

java.lang.Object
   |
   +----is.logi.crypto.Crypto
           |
           +----is.logi.crypto.sign.Signature

public class Signature
extends Crypto
This class stores a digital signature. It is created with a SignatureKey from a Fingerprint and can later be used to verify that Fignerprint with the same symmetric key or the other asymmetric key from the pair.

Author:
Logi Ragnarsson (logir@hi.is)
See Also:
Fingerprint, SignatureKey

Constructor Index

 o Signature(byte[], String, Fingerprint)
Create a new Signature object.

Method Index

 o getBytes()
Return the bytes from this signature.
 o getFingerprintAlgorithm()
Return the name of the algorithm used to fingerprint the data before signing.
 o getKeyPrint()
Return the fingerprint of the key used to verify this signature.
 o parseCDS(String)
If "Signature( key )" is a valid CDS for a Signature, then Signature.parseCDS(key) will return the described Signature object.
 o toString()
Return a CDS for this object.

Constructors

 o Signature
 public Signature(byte s[],
                  String algorithm,
                  Fingerprint k)
Create a new Signature object. It contains the signature s which was generated from a fingerprint using the specified algorithm. It can be verified with the key with fingerprint k.

Methods

 o parseCDS
 public static Signature parseCDS(String arg) throws InvalidCDSException
If "Signature( key )" is a valid CDS for a Signature, then Signature.parseCDS(key) will return the described Signature object.

A valid CDS can be created by calling the Signature.toString() method.

Throws: InvalidCDSException
if the CDS is malformed.
See Also:
fromString
 o getFingerprintAlgorithm
 public String getFingerprintAlgorithm()
Return the name of the algorithm used to fingerprint the data before signing.

 o getBytes
 public byte[] getBytes()
Return the bytes from this signature.

 o getKeyPrint
 public Fingerprint getKeyPrint()
Return the fingerprint of the key used to verify this signature.

 o toString
 public String toString()
Return a CDS for this object.

Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index