|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.keyczar.Verifier
org.keyczar.Signer
public class Signer
Signers may both sign and verify data using sets of symmetric or private
keys. Sets of public keys may only be used with Verifier
objects.
Signer
objects should be used with symmetric or private key sets to
generate signatures.
Constructor Summary | |
---|---|
Signer(KeyczarReader reader)
Initialize a new Signer with a KeyczarReader. |
|
Signer(java.lang.String fileLocation)
Initialize a new Signer with a key set location. |
Method Summary | |
---|---|
int |
digestSize()
Returns the size of signatures produced by this Signer. |
byte[] |
sign(byte[] input)
Sign the given input and return a signature. |
void |
sign(java.nio.ByteBuffer input,
java.nio.ByteBuffer output)
Sign the given input and write the signature to the given ByteBuffer |
java.lang.String |
sign(java.lang.String input)
Signs the given input String and return the output as a web-safe Base64 encoded String. |
java.lang.String |
toString()
|
Methods inherited from class org.keyczar.Verifier |
---|
verify, verify, verify |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Signer(KeyczarReader reader) throws KeyczarException
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 Signer(java.lang.String fileLocation) throws KeyczarException
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 int digestSize() throws KeyczarException
KeyczarException
- If this Signer does not have a primary or a
JCE exception occurs.public byte[] sign(byte[] input) throws KeyczarException
input
- The input to sign.
KeyczarException
- If this Signer does not have a primary or a
JCE exception occurs.public void sign(java.nio.ByteBuffer input, java.nio.ByteBuffer output) throws KeyczarException
input
- The input to sign.output
- The ByteBuffer to write the signature in.
KeyczarException
- If this Signer does not have a primary or a
JCE exception occurs.public java.lang.String sign(java.lang.String input) throws KeyczarException
input
- The input String to sign.
KeyczarException
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 |