Package anbxj
Class Crypto_SignedPair
java.lang.Object
anbxj.Crypto_SignedPair
- All Implemented Interfaces:
Serializable
Represents a signed pair of objects (SignedObject, Object) used for digital signatures.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCrypto_SignedPair(SignedObject signedObject, Object signedContent, String signatureScheme) Constructs a Crypto_SignedPair with the specified SignedObject, object, and signature scheme. -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic Crypto_SignedPairfromByteArray(byte[] data) Deserializes aCrypto_SignedPairfrom a byte array, delegating toCrypto_SerializationUtils.deserialize(byte[]).Gets the signature scheme used for digital signatures.Gets the signed content in the signed pair.Gets the SignedObject in the signed pair.inthashCode()byte[]Serializes thisCrypto_SignedPairinto a byte array using standard Java object serialization, delegating toCrypto_SerializationUtils.serialize(Object).toString()
-
Constructor Details
-
Crypto_SignedPair
Constructs a Crypto_SignedPair with the specified SignedObject, object, and signature scheme.- Parameters:
signedObject- The SignedObject.signedContent- The object.signatureScheme- The signature scheme used for digital signatures.
-
-
Method Details
-
getSignedContent
Gets the signed content in the signed pair.- Returns:
- The signed content.
-
getSignatureScheme
Gets the signature scheme used for digital signatures.- Returns:
- The signature scheme.
-
getSignedObject
Gets the SignedObject in the signed pair.- Returns:
- The SignedObject.
-
toByteArray
Serializes thisCrypto_SignedPairinto a byte array using standard Java object serialization, delegating toCrypto_SerializationUtils.serialize(Object).- Returns:
- the serialized bytes
- Throws:
IOException- if an I/O error occurs during serialization
-
fromByteArray
public static Crypto_SignedPair fromByteArray(byte[] data) throws IOException, ClassNotFoundException Deserializes aCrypto_SignedPairfrom a byte array, delegating toCrypto_SerializationUtils.deserialize(byte[]).- Parameters:
data- the bytes produced bytoByteArray()- Returns:
- the reconstructed
Crypto_SignedPair - Throws:
IOException- if an I/O error occurs during deserializationClassNotFoundException- if the class of the serialized object cannot be found
-
hashCode
public int hashCode() -
equals
-
toString
-