// Token: 0x060018A5 RID: 6309 RVA: 0x00091F40 File Offset: 0x00090140 private SecureString ReadOpaqueSecureString() { GCHandle gchandle = default(GCHandle); SecureString result; try { int num = this.ReadMultiByteInteger(); if (num > WbxmlReader.maxSecureStringLength) { throw new WbxmlException("Opaque secure string is too long"); } byte[] array = new byte[num]; gchandle = GCHandle.Alloc(array, GCHandleType.Pinned); this.ReadBytes(array); result = WbxmlReader.ConvertToSecureString(array); } finally { if (gchandle.IsAllocated) { gchandle.Free(); } } return(result); }
// Token: 0x060018A2 RID: 6306 RVA: 0x00091E1C File Offset: 0x0009001C private SecureString ReadInlineSecureString() { long position = this.stream.Position; long num = position; while (this.ReadByte() != 0) { num += 1L; } this.stream.Position = position; GCHandle gchandle = default(GCHandle); SecureString result; try { int num2 = (int)(num - position) + 1; if (num2 > WbxmlReader.maxSecureStringLength) { throw new WbxmlException("Inline secure string is too long"); } byte[] array = new byte[num2]; gchandle = GCHandle.Alloc(array, GCHandleType.Pinned); this.ReadBytes(array); result = WbxmlReader.ConvertToSecureString(array); } finally { if (gchandle.IsAllocated) { gchandle.Free(); } } return(result); }