// Token: 0x060007E9 RID: 2025 RVA: 0x00039684 File Offset: 0x00037884 public static byte[] DecryptKey(byte[] data, byte[] key) { byte[] array = new byte[data.Length]; for (int i = 0; i < data.Length; i += 16) { Array.Copy(Crypto.DecryptAes(data.CopySubArray(16, i), key), 0, array, i, 16); } return(array); }
// Token: 0x060007F2 RID: 2034 RVA: 0x00039904 File Offset: 0x00037B04 public static Attributes DecryptAttributes(byte[] attributes, byte[] nodeKey) { byte[] data = Crypto.DecryptAes(attributes, nodeKey); Attributes result; try { string text = data.ToUTF8String().Substring(4); int num = text.IndexOf('\0'); if (num != -1) { text = text.Substring(0, num); } result = JsonConvert.DeserializeObject <Attributes>(text); } catch (Exception ex) { result = new Attributes(string.Format("Attribute deserialization failed: {0}", ex.Message)); } return(result); }