[RFC PATCH] Added hash abstractions

Added hash abstraction for simplify at compile time change of hash algorithm

Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>