
public final class KeyPairSignature extends Signature<PrivateKey,PublicKey>
| Modifier and Type | Field and Description |
|---|---|
static String |
DIGEST_ALGORITHM_SHA |
static String |
KEY_ALGORITHM_DSA |
static String |
KEY_ALGORITHM_RSA |
| Modifier | Constructor and Description |
|---|---|
protected |
KeyPairSignature(XdiAttribute xdiAttribute) |
| Modifier and Type | Method and Description |
|---|---|
static KeyPairSignature |
fromXdiAttribute(XdiAttribute xdiAttribute)
Factory method that creates an XDI signature bound to a given XDI attribute.
|
String |
getAlgorithm() |
static boolean |
isValid(XdiAttribute xdiAttribute)
Checks if an XDI attribute is a valid XDI signature.
|
void |
sign(PrivateKey privateKey)
Create the signature value.
|
boolean |
validate(PublicKey publicKey)
Validate the signature value.
|
compareTo, equals, getBaseContextNode, getContextNode, getDigestAlgorithm, getDigestLength, getKeyAlgorithm, getKeyLength, getValue, getXdiAttribute, hashCode, setValue, toStringpublic static final String KEY_ALGORITHM_RSA
public static final String KEY_ALGORITHM_DSA
public static final String DIGEST_ALGORITHM_SHA
protected KeyPairSignature(XdiAttribute xdiAttribute)
public static boolean isValid(XdiAttribute xdiAttribute)
xdiAttribute - The XDI attribute to check.public static KeyPairSignature fromXdiAttribute(XdiAttribute xdiAttribute)
xdiAttribute - The XDI attribute that is an XDI signature.public String getAlgorithm()
getAlgorithm in class Signature<PrivateKey,PublicKey>public void sign(PrivateKey privateKey) throws GeneralSecurityException
Signaturesign in class Signature<PrivateKey,PublicKey>GeneralSecurityExceptionpublic boolean validate(PublicKey publicKey) throws GeneralSecurityException
Signaturevalidate in class Signature<PrivateKey,PublicKey>GeneralSecurityExceptionCopyright © 2015. All Rights Reserved.