public static void Encode(XdrDataOutputStream stream, EncryptedBody encodedEncryptedBody) { int EncryptedBodysize = encodedEncryptedBody.InnerValue.Length; stream.WriteInt(EncryptedBodysize); stream.Write(encodedEncryptedBody.InnerValue, 0, EncryptedBodysize); }
public static EncryptedBody Decode(XdrDataInputStream stream) { EncryptedBody decodedEncryptedBody = new EncryptedBody(); int EncryptedBodysize = stream.ReadInt(); decodedEncryptedBody.InnerValue = new byte[EncryptedBodysize]; stream.Read(decodedEncryptedBody.InnerValue, 0, EncryptedBodysize); return(decodedEncryptedBody); }