using System; using System.Runtime.InteropServices; using Mono.Security.Cryptography; namespace System.Security.Cryptography { /// Computes a Hash-based Message Authentication Code (HMAC) using the hash function. // Token: 0x02000506 RID: 1286 [ComVisible(true)] public class HMACSHA384 : HMAC { /// Initializes a new instance of the class by using a randomly generated key. // Token: 0x06002F65 RID: 12133 RVA: 0x00098BA0 File Offset: 0x00096DA0 public HMACSHA384() : this(KeyBuilder.Key(8)) { this.ProduceLegacyHmacValues = HMACSHA384.legacy_mode; } /// Initializes a new instance of the class by using the specified key data. /// The secret key for encryption. The key can be any length. However, if it is more than 64 bytes long it will be hashed (using SHA-1) to derive a 64-byte key. Therefore, the recommended size of the secret key is 64 bytes. /// The parameter is null. // Token: 0x06002F66 RID: 12134 RVA: 0x00098BBC File Offset: 0x00096DBC public HMACSHA384(byte[] key) { this.ProduceLegacyHmacValues = HMACSHA384.legacy_mode; base.HashName = "SHA384"; this.HashSizeValue = 384; this.Key = key; } /// Provides a workaround for the .NET Framework version 2.0 implementation of the algorithm, which is inconsistent with the .NET Framework version 2.0 Service Pack 1 implementation of the algorithm. /// true to enable .NET Framework version 2.0 Service Pack 1 applications to interact with .NET Framework 2.0 applications; otherwise, false. // Token: 0x1700095B RID: 2395 // (get) Token: 0x06002F68 RID: 12136 RVA: 0x00098C14 File Offset: 0x00096E14 // (set) Token: 0x06002F69 RID: 12137 RVA: 0x00098C1C File Offset: 0x00096E1C public bool ProduceLegacyHmacValues { get { return this.legacy; } set { this.legacy = value; base.BlockSizeValue = ((!this.legacy) ? 128 : 64); } } // Token: 0x04001356 RID: 4950 private static bool legacy_mode = Environment.GetEnvironmentVariable("legacyHMACMode") == "1"; // Token: 0x04001357 RID: 4951 private bool legacy; } }