Class HandleSignature


  • @Deprecated
    public class HandleSignature
    extends java.lang.Object
    Deprecated.
    Use JsonWebSignature and allied classes.
    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.
    • Field Detail

      • METADATA_TYPE

        public static final byte[] METADATA_TYPE
        Deprecated.
      • SIGNATURE_TYPE

        public static final byte[] SIGNATURE_TYPE
        Deprecated.
      • VALUE_DIGEST_OFFSET

        public static final int VALUE_DIGEST_OFFSET
        Deprecated.
        See Also:
        Constant Field Values
    • Constructor Detail

    • Method Detail

      • getHandle

        public java.lang.String getHandle()
        Deprecated.
      • getDigestsValue

        public HandleValue getDigestsValue()
        Deprecated.
      • getAlgorithm

        public java.lang.String getAlgorithm()
        Deprecated.
      • getSignature

        public byte[] getSignature()
        Deprecated.
      • toString

        public java.lang.String toString()
        Deprecated.
        Overrides:
        toString in class java.lang.Object
      • updateForHandleValue

        public static void updateForHandleValue​(java.security.MessageDigest digest,
                                                byte[] encodedHandleValue)
        Deprecated.
      • updateForHandleValue

        public static void updateForHandleValue​(java.security.Signature sig,
                                                byte[] encodedHandleValue)
                                         throws java.security.SignatureException
        Deprecated.
        Throws:
        java.security.SignatureException
      • verifySignature

        public boolean verifySignature​(java.security.PublicKey pubKey)
                                throws java.lang.Exception
        Deprecated.
        Throws:
        java.lang.Exception
      • verifyValue

        public boolean verifyValue​(java.lang.String handle,
                                   HandleValue value)
                            throws java.security.NoSuchAlgorithmException
        Deprecated.
        Throws:
        java.security.NoSuchAlgorithmException
      • signsMissingValues

        public boolean signsMissingValues​(HandleValue[] values)
        Deprecated.
      • getSignatures

        public static java.util.List<HandleSignature> getSignatures​(HandleValue[] values,
                                                                    HandleValue value,
                                                                    boolean throwOnError)
                                                             throws java.lang.Exception
        Deprecated.
        Throws:
        java.lang.Exception
      • getSignatures

        public static java.util.List<HandleSignature> getSignatures​(HandleValue[] values,
                                                                    boolean throwOnError)
                                                             throws java.lang.Exception
        Deprecated.
        Throws:
        java.lang.Exception
      • createDigestsValue

        public static HandleValue createDigestsValue​(int index,
                                                     java.lang.String handle,
                                                     HandleValue[] values)
        Deprecated.
      • createSignatureValue

        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
        Deprecated.
        Throws:
        java.lang.Exception
      • signedHandleValues

        public static HandleValue[] signedHandleValues​(java.lang.String handle,
                                                       HandleValue[] values,
                                                       HandleSignature signature,
                                                       java.security.PublicKey pubKey,
                                                       boolean throwOnError)
                                                throws java.lang.Exception
        Deprecated.
        Throws:
        java.lang.Exception
      • signsAllValues

        public static boolean signsAllValues​(java.lang.String handle,
                                             HandleValue[] values,
                                             HandleSignature signature,
                                             java.security.PublicKey pubKey,
                                             boolean throwOnError)
                                      throws java.lang.Exception
        Deprecated.
        Throws:
        java.lang.Exception
      • valueNeedsSignature

        public static boolean valueNeedsSignature​(HandleValue value)
        Deprecated.