Class SHA256KeyHashingScheme
- java.lang.Object
-
- org.apache.http.impl.client.cache.memcached.SHA256KeyHashingScheme
-
- All Implemented Interfaces:
KeyHashingScheme
public class SHA256KeyHashingScheme extends java.lang.Object implements KeyHashingScheme
This is aKeyHashingScheme
based on the SHA-256 algorithm. The hashes produced are hex-encoded SHA-256 digests and hence are always 64-character hexadecimal strings.
-
-
Constructor Summary
Constructors Constructor Description SHA256KeyHashingScheme()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
hash(java.lang.String key)
Maps a storage key to a cache key.
-
-
-
Method Detail
-
hash
public java.lang.String hash(java.lang.String key)
Description copied from interface:KeyHashingScheme
Maps a storage key to a cache key. The storage key is what the higher-level HTTP cache uses as a key; the cache key is what we use as a key for talking to memcached.- Specified by:
hash
in interfaceKeyHashingScheme
- Parameters:
key
- what the higher-level HTTP cache wants to use as its key for looking up cache entries- Returns:
- a cache key suitable for use with memcached
-
-