public static int Serialize(Image value, char[] buf, int pos) { using (var ms = new MemoryStream()) { SaveImage(value, ms); ms.Position = 0; return(ByteaConverter.Serialize(ms.ToArray(), buf, pos)); } }
public static int Serialize(SecureString value, char[] buf, int pos) { return(ByteaConverter.Serialize(ExtractBytesAndEcrypt(value), buf, pos)); }