|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.keyczar.Verifier
public class Verifier
Verifiers are used strictly to verify signatures. Typically, Verifiers will
read sets of public keys, although may also be instantiated with sets of
symmetric or private keys.
Signer
objects should be used with symmetric or private key sets to
generate signatures.
Constructor Summary | |
---|---|
Verifier(KeyczarReader reader)
Initialize a new Verifier with a KeyczarReader. |
|
Verifier(java.lang.String fileLocation)
Initialize a new Verifier with a key set location. |
Method Summary | |
---|---|
java.lang.String |
toString()
|
boolean |
verify(byte[] data,
byte[] signature)
Verifies a signature on the given byte array of data |
boolean |
verify(java.nio.ByteBuffer data,
java.nio.ByteBuffer signature)
Verifies the signature on the data stored in the given ByteBuffer |
boolean |
verify(java.lang.String data,
java.lang.String signature)
Verifies the signature on the given String |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Verifier(KeyczarReader reader) throws KeyczarException
KeyPurpose.VERIFY
or
KeyPurpose.SIGN_AND_VERIFY
.
reader
- A reader to read keys from
KeyczarException
- In the event of an IO error reading keys or if the
key set does not have the appropriate purpose.public Verifier(java.lang.String fileLocation) throws KeyczarException
KeyPurpose.VERIFY
or
KeyPurpose.SIGN_AND_VERIFY
fileLocation
- Directory containing a key set
KeyczarException
- In the event of an IO error reading keys or if the
key set does not have the appropriate purpose.Method Detail |
---|
public boolean verify(byte[] data, byte[] signature) throws KeyczarException
data
- The data to verify the signature onsignature
- The signture to verify
KeyczarException
- If the signature is malformed or a JCE error
occurs.public boolean verify(java.nio.ByteBuffer data, java.nio.ByteBuffer signature) throws KeyczarException
data
- The data to verify the signature onsignature
- The signature to verify
KeyczarException
- If the signature is malformed or a JCE error
occurs.public boolean verify(java.lang.String data, java.lang.String signature) throws KeyczarException
data
- The data to verify the signature onsignature
- The signature to verify
KeyczarException
- If the signature is malformed or a JCE error
occurs.public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |