Package net.handle.hdllib
Class HandleSignature
java.lang.Object
net.handle.hdllib.HandleSignature
Deprecated.
A signature over some handle values. The form of the signature is two handle values, one with type 10320/sig.digest containing a digest of all the signed values,
and a second of type 10320/sig.sig containing a signature of the digest value. Example data:
<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.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Deprecated.static class
Deprecated. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final byte[]
Deprecated.static final byte[]
Deprecated.static final int
Deprecated. -
Constructor Summary
ConstructorsConstructorDescriptionHandleSignature
(HandleValue digestsValue, HandleSignature.DigestsValue parsedDigestValue, String algorithm, ValueReference signer, byte[] signature) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionstatic HandleValue
createDigestsValue
(int index, String handle, HandleValue[] values) Deprecated.static HandleValue
createSignatureValue
(int index, String handle, ValueReference signer, String alg, PrivateKey privKey, HandleValue digestsValue) Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.byte[]
Deprecated.static List
<HandleSignature> getSignatures
(HandleValue[] values, boolean throwOnError) Deprecated.static List
<HandleSignature> getSignatures
(HandleValue[] values, HandleValue value, boolean throwOnError) Deprecated.static List
<HandleSignature> getSignaturesQuietly
(HandleValue[] values) Deprecated.Deprecated.static HandleValue[]
signedHandleValues
(String handle, HandleValue[] values, HandleSignature signature, PublicKey pubKey, boolean throwOnError) Deprecated.static boolean
signsAllValues
(String handle, HandleValue[] values, HandleSignature signature, PublicKey pubKey, boolean throwOnError) Deprecated.boolean
signsMissingValues
(HandleValue[] values) Deprecated.toString()
Deprecated.static void
updateForHandleValue
(MessageDigest digest, byte[] encodedHandleValue) Deprecated.static void
updateForHandleValue
(Signature sig, byte[] encodedHandleValue) Deprecated.static boolean
valueNeedsSignature
(HandleValue value) Deprecated.boolean
verifySignature
(PublicKey pubKey) Deprecated.boolean
verifyValue
(String handle, HandleValue value) Deprecated.
-
Field Details
-
METADATA_TYPE
public static final byte[] METADATA_TYPEDeprecated. -
SIGNATURE_TYPE
public static final byte[] SIGNATURE_TYPEDeprecated. -
VALUE_DIGEST_OFFSET
public static final int VALUE_DIGEST_OFFSETDeprecated.- See Also:
-
-
Constructor Details
-
HandleSignature
public HandleSignature(HandleValue digestsValue, HandleSignature.DigestsValue parsedDigestValue, String algorithm, ValueReference signer, byte[] signature) throws Exception Deprecated.- Throws:
Exception
-
-
Method Details
-
getHandle
Deprecated. -
getDigestsValue
Deprecated. -
getParsedDigestsValue
Deprecated. -
getAlgorithm
Deprecated. -
getSigner
Deprecated. -
getSignature
public byte[] getSignature()Deprecated. -
toString
Deprecated. -
updateForHandleValue
Deprecated. -
updateForHandleValue
public static void updateForHandleValue(Signature sig, byte[] encodedHandleValue) throws SignatureException Deprecated.- Throws:
SignatureException
-
verifySignature
Deprecated.- Throws:
Exception
-
verifyValue
Deprecated.- Throws:
NoSuchAlgorithmException
-
signsMissingValues
Deprecated. -
getSignatures
public static List<HandleSignature> getSignatures(HandleValue[] values, HandleValue value, boolean throwOnError) throws Exception Deprecated.- Throws:
Exception
-
getSignaturesQuietly
Deprecated. -
getSignatures
public static List<HandleSignature> getSignatures(HandleValue[] values, boolean throwOnError) throws Exception Deprecated.- Throws:
Exception
-
createDigestsValue
Deprecated. -
createSignatureValue
public static HandleValue createSignatureValue(int index, String handle, ValueReference signer, String alg, PrivateKey privKey, HandleValue digestsValue) throws Exception Deprecated.- Throws:
Exception
-
signedHandleValues
public static HandleValue[] signedHandleValues(String handle, HandleValue[] values, HandleSignature signature, PublicKey pubKey, boolean throwOnError) throws Exception Deprecated.- Throws:
Exception
-
signsAllValues
public static boolean signsAllValues(String handle, HandleValue[] values, HandleSignature signature, PublicKey pubKey, boolean throwOnError) throws Exception Deprecated.- Throws:
Exception
-
valueNeedsSignature
Deprecated.
-
JsonWebSignature
and allied classes.