org.xwiki.crypto.pkix
Class CertifyingSigner
java.lang.Object
org.xwiki.crypto.pkix.CertifyingSigner
- All Implemented Interfaces:
- Signer
@Unstable
public final class CertifyingSigner
- extends Object
- implements Signer
A signer for certifying certificate.
- Since:
- 5.4
- Version:
- $Id: b2fd28357c5868f44afe018572ab41411ade7544 $
Method Summary |
byte[] |
generate()
|
byte[] |
generate(byte[] input)
|
byte[] |
generate(byte[] input,
int inputOffset,
int inputLen)
|
String |
getAlgorithmName()
|
CertifiedPublicKey |
getCertifier()
|
byte[] |
getEncoded()
|
FilterInputStream |
getInputStream(InputStream is)
|
static CertifyingSigner |
getInstance(boolean forSigning,
CertifiedKeyPair certifier,
SignerFactory factory)
Get a certifying signer instance from the given signer factory for a given certifier. |
OutputStream |
getOutputStream()
|
boolean |
isForSigning()
|
void |
update(byte input)
|
void |
update(byte[] input)
|
void |
update(byte[] input,
int inputOffset,
int inputLen)
|
boolean |
verify(byte[] signature)
|
boolean |
verify(byte[] signature,
byte[] input)
|
boolean |
verify(byte[] signature,
int signOffset,
int signLen,
byte[] input,
int inputOffset,
int inputLen)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getInstance
public static CertifyingSigner getInstance(boolean forSigning,
CertifiedKeyPair certifier,
SignerFactory factory)
- Get a certifying signer instance from the given signer factory for a given certifier.
- Parameters:
forSigning
- true for signing, and false for verifying.certifier
- the certified key pair of the certifier.factory
- a signer factory to create the signer.
- Returns:
- a certifying signer.
getCertifier
public CertifiedPublicKey getCertifier()
- Returns:
- the certified public key of the certifier.
getAlgorithmName
public String getAlgorithmName()
- Specified by:
getAlgorithmName
in interface Signer
isForSigning
public boolean isForSigning()
- Specified by:
isForSigning
in interface Signer
getInputStream
public FilterInputStream getInputStream(InputStream is)
- Specified by:
getInputStream
in interface Signer
getOutputStream
public OutputStream getOutputStream()
- Specified by:
getOutputStream
in interface Signer
update
public void update(byte input)
- Specified by:
update
in interface Signer
update
public void update(byte[] input)
- Specified by:
update
in interface Signer
update
public void update(byte[] input,
int inputOffset,
int inputLen)
- Specified by:
update
in interface Signer
generate
public byte[] generate()
throws GeneralSecurityException
- Specified by:
generate
in interface Signer
- Throws:
GeneralSecurityException
generate
public byte[] generate(byte[] input)
throws GeneralSecurityException
- Specified by:
generate
in interface Signer
- Throws:
GeneralSecurityException
generate
public byte[] generate(byte[] input,
int inputOffset,
int inputLen)
throws GeneralSecurityException
- Specified by:
generate
in interface Signer
- Throws:
GeneralSecurityException
verify
public boolean verify(byte[] signature)
throws GeneralSecurityException
- Specified by:
verify
in interface Signer
- Throws:
GeneralSecurityException
verify
public boolean verify(byte[] signature,
byte[] input)
throws GeneralSecurityException
- Specified by:
verify
in interface Signer
- Throws:
GeneralSecurityException
verify
public boolean verify(byte[] signature,
int signOffset,
int signLen,
byte[] input,
int inputOffset,
int inputLen)
throws GeneralSecurityException
- Specified by:
verify
in interface Signer
- Throws:
GeneralSecurityException
getEncoded
public byte[] getEncoded()
- Specified by:
getEncoded
in interface Signer
Copyright © 2004–2014 XWiki. All rights reserved.