Package anbxj

Class Crypto_SerializationUtils

java.lang.Object
anbxj.Crypto_SerializationUtils

public final class Crypto_SerializationUtils extends Object
Utility methods for serializing/deserializing objects using standard Java serialization. These are used by protocol-specific protobuf serializers to embed cryptographic wrappers (e.g., SignedObject) as opaque bytes.
  • Method Details

    • serialize

      public static byte[] serialize(Object obj) throws IOException
      Serializes an object to a byte array using Java object serialization.
      Parameters:
      obj - the object to serialize (must implement Serializable)
      Returns:
      the serialized bytes
      Throws:
      IOException - if serialization fails
    • deserialize

      public static Object deserialize(byte[] data) throws IOException, ClassNotFoundException
      Deserializes an object from a byte array.
      Parameters:
      data - the bytes produced by serialize(Object)
      Returns:
      the deserialized object
      Throws:
      IOException - if an I/O error occurs
      ClassNotFoundException - if the class of the serialized object cannot be found