IT. Expert System.

Android Reference

SignedObject


java.security

Class SignedObject

  • All Implemented Interfaces:
    Serializable


    public final class SignedObject
    extends Object
    implements Serializable
    A SignedObject instance acts as a container for another object. The SignedObject contains the target in serialized form along with a digital signature of the serialized data.
    See Also:
    Serialized Form
    • Constructor Detail

      • SignedObject

        public SignedObject(Serializable object,
                    PrivateKey signingKey,
                    Signature signingEngine)
                     throws IOException,
                            InvalidKeyException,
                            SignatureException
        Constructs a new instance of SignedObject with the target object, the private key and the engine to compute the signature. The given object is signed with the specified key and engine.
        Parameters:
        object - the object to bes signed.
        signingKey - the private key, used to sign the object.
        signingEngine - the engine that performs the signature generation.
        Throws:
        IOException - if a serialization error occurs.
        InvalidKeyException - if the private key is not valid.
        SignatureException - if signature generation failed.
    • Method Detail

      • getObject

        public Object getObject()
                         throws IOException,
                                ClassNotFoundException
        Returns the encapsulated object. Each time this method is invoked, the encapsulated object is deserialized before it is returned.
        Returns:
        the encapsulated object.
        Throws:
        IOException - if deserialization failed.
        ClassNotFoundException - if the class of the encapsulated object can not be found.
      • getSignature

        public byte[] getSignature()
        Returns the signature data of the encapsulated serialized object.
        Returns:
        the signature data of the encapsulated serialized object.
      • getAlgorithm

        public String getAlgorithm()
        Returns the name of the algorithm of this SignedObject.
        Returns:
        the name of the algorithm of this SignedObject.
      • verify

        public boolean verify(PublicKey verificationKey,
                     Signature verificationEngine)
                       throws InvalidKeyException,
                              SignatureException
        Indicates whether the contained signature for the encapsulated object is valid.
        Parameters:
        verificationKey - the public key to verify the signature.
        verificationEngine - the signature engine.
        Returns:
        true if the contained signature for the encapsulated object is valid, false otherwise.
        Throws:
        InvalidKeyException - if the public key is invalid.
        SignatureException - if signature verification failed.


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 67 / 158777590. Delta: 0.03474 с