|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.itextpdf.text.pdf.security.PrivateKeySignature
public class PrivateKeySignature
Implementation of the ExternalSignature interface that can be used when you have a PrivateKey object.
| Constructor Summary | |
|---|---|
PrivateKeySignature(java.security.PrivateKey pk,
java.lang.String hashAlgorithm,
java.lang.String provider)
Creates an ExternalSignature instance |
|
| Method Summary | |
|---|---|
java.lang.String |
getEncryptionAlgorithm()
Returns the encryption algorithm used for signing. |
java.lang.String |
getHashAlgorithm()
Returns the hash algorithm. |
byte[] |
sign(byte[] b)
Signs it using the encryption algorithm in combination with the digest algorithm. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PrivateKeySignature(java.security.PrivateKey pk,
java.lang.String hashAlgorithm,
java.lang.String provider)
pk - a PrivateKey objecthashAlgorithm - the hash algorithm (e.g. "SHA-1", "SHA-256",...)provider - the security provider (e.g. "BC")| Method Detail |
|---|
public java.lang.String getHashAlgorithm()
getHashAlgorithm in interface ExternalSignatureExternalSignature.getHashAlgorithm()public java.lang.String getEncryptionAlgorithm()
getEncryptionAlgorithm in interface ExternalSignatureExternalSignature.getEncryptionAlgorithm()
public byte[] sign(byte[] b)
throws java.security.GeneralSecurityException
sign in interface ExternalSignaturemessage - the message you want to be hashed and signed
java.security.GeneralSecurityException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||