97 lines
3.1 KiB
C#
97 lines
3.1 KiB
C#
using System;
|
|
using System.Runtime.InteropServices;
|
|
|
|
namespace System.Configuration.Assemblies
|
|
{
|
|
/// <summary>Represents a hash of an assembly manifest's contents.</summary>
|
|
// Token: 0x02000145 RID: 325
|
|
[Obsolete]
|
|
[ComVisible(true)]
|
|
[Serializable]
|
|
public struct AssemblyHash : ICloneable
|
|
{
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.Configuration.Assemblies.AssemblyHash" /> structure with the specified hash algorithm and the hash value.</summary>
|
|
/// <param name="algorithm">The algorithm used to generate the hash. Values for this parameter come from the <see cref="T:System.Configuration.Assemblies.AssemblyHashAlgorithm" /> enumeration. </param>
|
|
/// <param name="value">The hash value. </param>
|
|
// Token: 0x060010B9 RID: 4281 RVA: 0x00044D78 File Offset: 0x00042F78
|
|
[Obsolete]
|
|
public AssemblyHash(AssemblyHashAlgorithm algorithm, byte[] value)
|
|
{
|
|
this._algorithm = algorithm;
|
|
if (value != null)
|
|
{
|
|
this._value = (byte[])value.Clone();
|
|
}
|
|
else
|
|
{
|
|
this._value = null;
|
|
}
|
|
}
|
|
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.Configuration.Assemblies.AssemblyHash" /> structure with the specified hash value. The hash algorithm defaults to <see cref="F:System.Configuration.Assemblies.AssemblyHashAlgorithm.SHA1" />.</summary>
|
|
/// <param name="value">The hash value. </param>
|
|
// Token: 0x060010BA RID: 4282 RVA: 0x00044DB0 File Offset: 0x00042FB0
|
|
[Obsolete]
|
|
public AssemblyHash(byte[] value)
|
|
{
|
|
this = new AssemblyHash(AssemblyHashAlgorithm.SHA1, value);
|
|
}
|
|
|
|
/// <summary>Gets or sets the hash algorithm.</summary>
|
|
/// <returns>An assembly hash algorithm.</returns>
|
|
// Token: 0x170002C9 RID: 713
|
|
// (get) Token: 0x060010BC RID: 4284 RVA: 0x00044DD0 File Offset: 0x00042FD0
|
|
// (set) Token: 0x060010BD RID: 4285 RVA: 0x00044DD8 File Offset: 0x00042FD8
|
|
[Obsolete]
|
|
public AssemblyHashAlgorithm Algorithm
|
|
{
|
|
get
|
|
{
|
|
return this._algorithm;
|
|
}
|
|
set
|
|
{
|
|
this._algorithm = value;
|
|
}
|
|
}
|
|
|
|
/// <summary>Clones this object.</summary>
|
|
/// <returns>An exact copy of this object.</returns>
|
|
// Token: 0x060010BE RID: 4286 RVA: 0x00044DE4 File Offset: 0x00042FE4
|
|
[Obsolete]
|
|
public object Clone()
|
|
{
|
|
return new AssemblyHash(this._algorithm, this._value);
|
|
}
|
|
|
|
/// <summary>Gets the hash value.</summary>
|
|
/// <returns>The hash value.</returns>
|
|
// Token: 0x060010BF RID: 4287 RVA: 0x00044DFC File Offset: 0x00042FFC
|
|
[Obsolete]
|
|
public byte[] GetValue()
|
|
{
|
|
return this._value;
|
|
}
|
|
|
|
/// <summary>Sets the hash value.</summary>
|
|
/// <param name="value">The hash value. </param>
|
|
// Token: 0x060010C0 RID: 4288 RVA: 0x00044E04 File Offset: 0x00043004
|
|
[Obsolete]
|
|
public void SetValue(byte[] value)
|
|
{
|
|
this._value = value;
|
|
}
|
|
|
|
// Token: 0x0400040E RID: 1038
|
|
private AssemblyHashAlgorithm _algorithm;
|
|
|
|
// Token: 0x0400040F RID: 1039
|
|
private byte[] _value;
|
|
|
|
/// <summary>An empty <see cref="T:System.Configuration.Assemblies.AssemblyHash" /> object.</summary>
|
|
// Token: 0x04000410 RID: 1040
|
|
[Obsolete]
|
|
public static readonly AssemblyHash Empty = new AssemblyHash(AssemblyHashAlgorithm.None, null);
|
|
}
|
|
}
|