• Articles
  • API Documentation
Search Results for

    Show / Hide Table of Contents
    • SixLabors.ImageSharp.Web
      • FormattedImage
      • FormatUtilities
      • ImageCacheMetadata
      • ImageMetadata
    • SixLabors.ImageSharp.Web.Caching
      • CacheHash
      • ICacheHash
      • IImageCache
      • PhysicalFileSystemCache
      • PhysicalFileSystemCacheOptions
    • SixLabors.ImageSharp.Web.Commands
      • CommandParser
      • DictionaryExtensions
      • IRequestParser
      • PresetOnlyQueryCollectionRequestParser
      • PresetOnlyQueryCollectionRequestParserOptions
      • QueryCollectionRequestParser
    • SixLabors.ImageSharp.Web.Commands.Converters
      • ICommandConverter
      • ICommandConverter<T>
    • SixLabors.ImageSharp.Web.DependencyInjection
      • ApplicationBuilderExtensions
      • IImageSharpBuilder
      • ImageSharpBuilderExtensions
      • ImageSharpConfiguration
      • ServiceCollectionExtensions
    • SixLabors.ImageSharp.Web.Middleware
      • ConcurrentDictionaryExtensions
      • ImageCommandContext
      • ImageProcessingContext
      • ImageSharpMiddleware
      • ImageSharpMiddlewareOptions
    • SixLabors.ImageSharp.Web.Processors
      • BackgroundColorWebProcessor
      • FormatWebProcessor
      • IImageWebProcessor
      • JpegQualityWebProcessor
      • ResizeWebProcessor
    • SixLabors.ImageSharp.Web.Providers
      • IImageProvider
      • PhysicalFileSystemProvider
      • ProcessingBehavior
    • SixLabors.ImageSharp.Web.Resolvers
      • IImageCacheResolver
      • IImageResolver
      • PhysicalFileSystemCacheResolver
      • PhysicalFileSystemResolver
    • SixLabors.ImageSharp.Web.Synchronization
      • AsyncKeyLock<TKey>
      • AsyncKeyReaderWriterLock<TKey>
      • AsyncLock
      • AsyncReaderWriterLock
      • RefCountedConcurrentDictionary<TKey, TValue>

    Class CacheHash

    Creates hashed keys for the given inputs hashing them to string of length ranging from 2 to 64. Hashed keys are the result of the SHA256 computation of the input value for the given length. This ensures low collision rates with a shorter file name.

    Inheritance
    Object
    CacheHash
    Implements
    ICacheHash
    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.Caching
    Assembly: SixLabors.ImageSharp.Web.dll
    Syntax
    public sealed class CacheHash : ICacheHash

    Constructors

    | Improve this Doc View Source

    CacheHash(IOptions<ImageSharpMiddlewareOptions>)

    Initializes a new instance of the CacheHash class.

    Declaration
    public CacheHash(IOptions<ImageSharpMiddlewareOptions> options)
    Parameters
    Type Name Description
    IOptions<ImageSharpMiddlewareOptions> options

    The middleware configuration options.

    Methods

    | Improve this Doc View Source

    Create(String, UInt32)

    Returns the hashed file name for the cached image file.

    Declaration
    public string Create(string value, uint length)
    Parameters
    Type Name Description
    String value

    The input value to hash.

    UInt32 length

    The length of the returned hash without any extensions.

    Returns
    Type Description
    String

    The String.

    Implements

    ICacheHash
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX