protected override object JGetObject(MemoryStream bytes) { object[] partes = GetPartsObject(bytes); CrazyKey.CrazyItem cKeyItem = new CrazyKey.CrazyItem(); cKeyItem.GenKey = (byte)partes[0]; cKeyItem.DataMethods = (CrazyKey.CrazyItem.MetodoEncrypt)(byte) partes[1]; cKeyItem.PasswordMethods = (CrazyKey.CrazyItem.MetodoEncrypt)(byte) partes[2]; return(cKeyItem); }
protected override IList IGetPartsObject(object obj) { CrazyKey.CrazyItem item = obj as CrazyKey.CrazyItem; return(new object[] { item.GenKey, (byte)(int)item.DataMethods, (byte)(int)item.PasswordMethods }); }