@ParametersAreNullableByDefault @Nullable public final class GenericCertificate extends Object implements Repository
| Constructor and Description |
|---|
GenericCertificate() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
String |
getEncoded() |
String |
getSignature() |
String |
getSignatureAlgorithm() |
String |
getSignatureEncoding() |
int |
hashCode() |
RepositoryModel |
model()
Returns the repository model.
|
void |
setEncoded(String encoded) |
void |
setSignature(String signature) |
void |
setSignatureAlgorithm(String algorithm) |
void |
setSignatureEncoding(String signatureEncoding) |
Artifactory |
sign(Codec codec,
Signature engine,
PrivateKey key,
Object artifact)
Encodes and signs the given
artifact
and returns an artifactory for decoding it. |
Artifactory |
verify(Codec codec,
Signature engine,
PublicKey key)
Verifies the signature of the encoded artifact
and returns an artifactory for decoding it.
|
public String getEncoded()
public String getSignature()
public String getSignatureAlgorithm()
public String getSignatureEncoding()
public RepositoryModel model()
Repositorymodel in interface Repositorypublic void setEncoded(String encoded)
public void setSignature(String signature)
public void setSignatureAlgorithm(String algorithm)
public void setSignatureEncoding(String signatureEncoding)
public Artifactory sign(Codec codec, Signature engine, PrivateKey key, @Nullable Object artifact) throws Exception
Repositoryartifact
and returns an artifactory for decoding it.
As a side effect, the state of this repository is modified so that a
subsequent verification can succeed.sign in interface Repositorycodec - the codec for encoding the artifact.
It is an implementation detail whether or not encoding
null is supported or not.engine - the signature engine.key - the private key.artifact - the nullable artifact to sign.
This may be null if and only if the codec
supports encoding it.Exceptionpublic Artifactory verify(Codec codec, Signature engine, PublicKey key) throws Exception
Repositoryverify in interface Repositorycodec - the codec for decoding the artifact.
It is an implementation detail whether or not decoding
null is supported or not.engine - the signature engine.key - the public key.RepositoryIntegrityException - if the integrity of the repository
with its encoded artifact has been compromised.ExceptionCopyright © 2005–2017 Schlichtherle IT Services. All rights reserved.