public static byte[] serializeAndEncodeObject(final EncodableCipher cipher,
                                                  final Serializable object) {
        return serializeAndEncodeObject(cipher, object, ArrayUtils.EMPTY_OBJECT_ARRAY);
    }
Serialize and encode object byte [ ].

@param cipher the cipher
@param object the object
@return the byte []
core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/serialization/SerializationUtils.java