• Articles
  • API Documentation
Search Results for

    Show / Hide Table of Contents
    • SixLabors.ImageSharp.Web
      • CaseHandlingUriBuilder
      • CaseHandlingUriBuilder.CaseHandling
      • CommandHandling
      • ExifOrientationUtilities
      • Format
      • FormatCommand
      • FormatUtilities
      • FormattedImage
      • HMACUtilities
      • ImageCacheMetadata
      • ImageMetadata
      • RequestAuthorizationUtilities
      • Resampler
      • ResamplerCommand
    • SixLabors.ImageSharp.Web.Caching
      • ICacheHash
      • ICacheKey
      • IImageCache
      • LegacyV1CacheKey
      • PhysicalFileSystemCache
      • PhysicalFileSystemCacheOptions
      • SHA256CacheHash
      • UriAbsoluteCacheKey
      • UriAbsoluteLowerInvariantCacheKey
      • UriRelativeCacheKey
      • UriRelativeLowerInvariantCacheKey
    • SixLabors.ImageSharp.Web.Commands
      • CommandCollection
      • CommandCollectionExtensions
      • CommandParser
      • IRequestParser
      • PresetOnlyQueryCollectionRequestParser
      • PresetOnlyQueryCollectionRequestParserOptions
      • QueryCollectionRequestParser
    • SixLabors.ImageSharp.Web.Commands.Converters
      • ArrayConverter<T>
      • ColorConverter
      • EnumConverter
      • ICommandConverter
      • ICommandConverter<T>
      • IntegralNumberConverter<T>
      • ListConverter<T>
      • SimpleCommandConverter<T>
    • SixLabors.ImageSharp.Web.DependencyInjection
      • ApplicationBuilderExtensions
      • IImageSharpBuilder
      • ImageSharpBuilderExtensions
      • ServiceCollectionExtensions
    • SixLabors.ImageSharp.Web.Middleware
      • ImageCommandContext
      • ImageProcessingContext
      • ImageSharpMiddleware
      • ImageSharpMiddlewareOptions
    • SixLabors.ImageSharp.Web.Processors
      • AutoOrientWebProcessor
      • BackgroundColorWebProcessor
      • FormatWebProcessor
      • IImageWebProcessor
      • QualityWebProcessor
      • ResizeWebProcessor
    • SixLabors.ImageSharp.Web.Providers
      • FileProviderImageProvider
      • IImageProvider
      • PhysicalFileSystemProvider
      • PhysicalFileSystemProviderOptions
      • ProcessingBehavior
      • WebRootImageProvider
    • SixLabors.ImageSharp.Web.Resolvers
      • FileProviderImageResolver
      • IImageCacheResolver
      • IImageResolver
      • PhysicalFileSystemCacheResolver
    • SixLabors.ImageSharp.Web.Synchronization
      • AsyncKeyLock<TKey>
      • AsyncKeyReaderWriterLock<TKey>
      • AsyncLock
      • AsyncReaderWriterLock
      • RefCountedConcurrentDictionary<TKey, TValue>
    • SixLabors.ImageSharp.Web.TagHelpers
      • HmacTokenTagHelper
      • ImageTagHelper

    Class HMACUtilities

    Provides methods to compute a Hash-based Message Authentication Code (HMAC).

    Inheritance
    object
    HMACUtilities
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: SixLabors.ImageSharp.Web
    Assembly: SixLabors.ImageSharp.Web.dll
    Syntax
    public static class HMACUtilities

    Fields

    TokenCommand

    The command used by image requests for transporting Hash-based Message Authentication Code (HMAC) tokens.

    Declaration
    public const string TokenCommand = "hmac"
    Field Value
    Type Description
    string

    Methods

    ComputeHMACSHA256(string, byte[])

    Computes a Hash-based Message Authentication Code (HMAC) by using the SHA256 hash function.

    Declaration
    public static string ComputeHMACSHA256(string value, byte[] secret)
    Parameters
    Type Name Description
    string value

    The value to hash

    byte[] secret

    The secret key for HMACSHA256 encryption. The key can be any length. However, the recommended size is 64 bytes.

    Returns
    Type Description
    string

    The hashed string.

    ComputeHMACSHA384(string, byte[])

    Computes a Hash-based Message Authentication Code (HMAC) by using the SHA384 hash function.

    Declaration
    public static string ComputeHMACSHA384(string value, byte[] secret)
    Parameters
    Type Name Description
    string value

    The value to hash

    byte[] secret

    The secret key for HMACSHA256 encryption. The key can be any length. However, the recommended size is 128 bytes.

    Returns
    Type Description
    string

    The hashed string.

    ComputeHMACSHA512(string, byte[])

    Computes a Hash-based Message Authentication Code (HMAC) by using the SHA512 hash function.

    Declaration
    public static string ComputeHMACSHA512(string value, byte[] secret)
    Parameters
    Type Name Description
    string value

    The value to hash

    byte[] secret

    The secret key for HMACSHA256 encryption. The key can be any length. However, the recommended size is 128 bytes.

    Returns
    Type Description
    string

    The hashed string.

    In this article
    Back to top Generated by DocFX