JsonWebSignature and allied classes.@Deprecated
public class HandleSignature
extends java.lang.Object
<digests hdl="0.NA/0.NA">
<val index="200" md5="908E0C8CB00955EC3D09FC2B0F0C69E2" sha1="5389F007F1450528015F7C1D8EBAE5A488FE954F"/>
<val index="100" md5="9D2A7E852A44A15C4427D731E3606A24" sha1="233E5EBE829E12EF82F23E4770F2791C7F59038F"/>
<val index="4" md5="7FFFA079E968352EDABB395A47620EA9" sha1="ED8106C0D89A60BD5AFDAC19730557938DE4E2ED"/>
<val index="3" md5="16B94473F4B84157182AEA3CB628D9FB" sha1="AAF878B1A4BB8EECCAD0F13A61C960C6009D53F0"/>
<val index="5" md5="2080ED829ECE843126DF65EEA68D920E" sha1="98B8FA558ADC3D256C741B229517AD5D7949AFD5"/>
<val index="6" md5="4F6F689F296B3DC6D28F012BC8773C9F" sha1="B2FCAD94DB174F2F179987F35D51B1AB5CB4BFCC"/>
<val index="101" md5="EA3474B36F7112F5551117429920533E" sha1="D8FCB133C7A211B3FA8C5627B3F48F97333BDE7C"/>
<val index="102" md5="EEBE40475DDED108CAA8AD9A3F66014B" sha1="0514AF918AB38775CA7F5A6CE95553CB29FE9480"/>
<val index="300" md5="0C9063ABA3D52F97FDE6BC3F88478A34" sha1="1B58B607566A0BCEF26CFBFF03384F47653B2D4C"/>
<val index="2" md5="02A5A450B5152E1CEE7668DFB63BC2BB" sha1="B20086A5702ED182551E26620C2EDAA048C57B98"/>
<val index="1" md5="355E6A68668771D0D13DE1851D865E6D" sha1="2CF199CF5A756EB25FA8803B4CB2B9C7FE6C33CD"/>
<val index="7" md5="9CEAAE6CC1B0CBA28BEAA48E54545ECF" sha1="CCEF7E44A4082F4AB285B058C941841A1456CA3E"/>
</digests>
and
<signature ofindex="400" hdl="0.NA/0.NA" signer="0.NA/0.NA" signerIndex="300">
<sig alg="SHA1withDSA" signer="0.NA/0.NA" signerIndex="300">302C02142306D496402DC1CE701244AD0905A38122CFA9FD0214432390E2C7132EFDC2F516FB6B9C670538B8CA32</sig>
</signature>
The hash of a handle value is a hash of its binary representation starting at offset 8, which corresponds to excluding the index and the timestamp from the hash.
The signature is a signature of the binary represenation of the digest value, again excluding offset and timestamp.
The signature value specifies the index of the corresponding digest value. The signed handle is specifed in the digest value.
The signature value specifies the signer as handle and index. It can actually contain multiple signatures of multiple signers.
The signature algorithm defaults to SHA1with(key-algorithm) if not specified.| Modifier and Type | Class and Description |
|---|---|
static class |
HandleSignature.Digest
Deprecated.
|
static class |
HandleSignature.DigestsValue
Deprecated.
|
| Modifier and Type | Field and Description |
|---|---|
static byte[] |
METADATA_TYPE
Deprecated.
|
static byte[] |
SIGNATURE_TYPE
Deprecated.
|
static int |
VALUE_DIGEST_OFFSET
Deprecated.
|
| Constructor and Description |
|---|
HandleSignature(HandleValue digestsValue,
HandleSignature.DigestsValue parsedDigestValue,
java.lang.String algorithm,
ValueReference signer,
byte[] signature)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
static HandleValue |
createDigestsValue(int index,
java.lang.String handle,
HandleValue[] values)
Deprecated.
|
static HandleValue |
createSignatureValue(int index,
java.lang.String handle,
ValueReference signer,
java.lang.String alg,
java.security.PrivateKey privKey,
HandleValue digestsValue)
Deprecated.
|
java.lang.String |
getAlgorithm()
Deprecated.
|
HandleValue |
getDigestsValue()
Deprecated.
|
java.lang.String |
getHandle()
Deprecated.
|
HandleSignature.DigestsValue |
getParsedDigestsValue()
Deprecated.
|
byte[] |
getSignature()
Deprecated.
|
static java.util.List<HandleSignature> |
getSignatures(HandleValue[] values,
boolean throwOnError)
Deprecated.
|
static java.util.List<HandleSignature> |
getSignatures(HandleValue[] values,
HandleValue value,
boolean throwOnError)
Deprecated.
|
static java.util.List<HandleSignature> |
getSignaturesQuietly(HandleValue[] values)
Deprecated.
|
ValueReference |
getSigner()
Deprecated.
|
static HandleValue[] |
signedHandleValues(java.lang.String handle,
HandleValue[] values,
HandleSignature signature,
java.security.PublicKey pubKey,
boolean throwOnError)
Deprecated.
|
static boolean |
signsAllValues(java.lang.String handle,
HandleValue[] values,
HandleSignature signature,
java.security.PublicKey pubKey,
boolean throwOnError)
Deprecated.
|
boolean |
signsMissingValues(HandleValue[] values)
Deprecated.
|
java.lang.String |
toString()
Deprecated.
|
static void |
updateForHandleValue(java.security.MessageDigest digest,
byte[] encodedHandleValue)
Deprecated.
|
static void |
updateForHandleValue(java.security.Signature sig,
byte[] encodedHandleValue)
Deprecated.
|
static boolean |
valueNeedsSignature(HandleValue value)
Deprecated.
|
boolean |
verifySignature(java.security.PublicKey pubKey)
Deprecated.
|
boolean |
verifyValue(java.lang.String handle,
HandleValue value)
Deprecated.
|
public static final byte[] METADATA_TYPE
public static final byte[] SIGNATURE_TYPE
public static final int VALUE_DIGEST_OFFSET
public HandleSignature(HandleValue digestsValue, HandleSignature.DigestsValue parsedDigestValue, java.lang.String algorithm, ValueReference signer, byte[] signature) throws java.lang.Exception
java.lang.Exceptionpublic java.lang.String getHandle()
public HandleValue getDigestsValue()
public HandleSignature.DigestsValue getParsedDigestsValue()
public java.lang.String getAlgorithm()
public ValueReference getSigner()
public byte[] getSignature()
public java.lang.String toString()
toString in class java.lang.Objectpublic static void updateForHandleValue(java.security.MessageDigest digest,
byte[] encodedHandleValue)
public static void updateForHandleValue(java.security.Signature sig,
byte[] encodedHandleValue)
throws java.security.SignatureException
java.security.SignatureExceptionpublic boolean verifySignature(java.security.PublicKey pubKey)
throws java.lang.Exception
java.lang.Exceptionpublic boolean verifyValue(java.lang.String handle,
HandleValue value)
throws java.security.NoSuchAlgorithmException
java.security.NoSuchAlgorithmExceptionpublic boolean signsMissingValues(HandleValue[] values)
public static java.util.List<HandleSignature> getSignatures(HandleValue[] values, HandleValue value, boolean throwOnError) throws java.lang.Exception
java.lang.Exceptionpublic static java.util.List<HandleSignature> getSignaturesQuietly(HandleValue[] values)
public static java.util.List<HandleSignature> getSignatures(HandleValue[] values, boolean throwOnError) throws java.lang.Exception
java.lang.Exceptionpublic static HandleValue createDigestsValue(int index, java.lang.String handle, HandleValue[] values)
public static HandleValue createSignatureValue(int index, java.lang.String handle, ValueReference signer, java.lang.String alg, java.security.PrivateKey privKey, HandleValue digestsValue) throws java.lang.Exception
java.lang.Exceptionpublic static HandleValue[] signedHandleValues(java.lang.String handle, HandleValue[] values, HandleSignature signature, java.security.PublicKey pubKey, boolean throwOnError) throws java.lang.Exception
java.lang.Exceptionpublic static boolean signsAllValues(java.lang.String handle,
HandleValue[] values,
HandleSignature signature,
java.security.PublicKey pubKey,
boolean throwOnError)
throws java.lang.Exception
java.lang.Exceptionpublic static boolean valueNeedsSignature(HandleValue value)