org.apache.shiro.crypto.hash.format
Interface ParsableHashFormat

All Superinterfaces:
HashFormat
All Known Implementing Classes:
Shiro1CryptFormat

public interface ParsableHashFormat
extends HashFormat

A ParsableHashFormat is able to parse a formatted string and convert it into a Hash instance.

This interface exists to represent HashFormats that can offer two-way conversion (Hash -> String, String -> Hash) capabilities. Some HashFormats, such as many ModularCryptFormats (like Unix Crypt(3)) only support one way conversion and therefore wouldn't implement this interface.

Since:
1.2
See Also:
Shiro1CryptFormat

Method Summary
 Hash parse(String formatted)
          Parses the specified formatted string and returns the corresponding Hash instance.
 
Methods inherited from interface org.apache.shiro.crypto.hash.format.HashFormat
format
 

Method Detail

parse

Hash parse(String formatted)
Parses the specified formatted string and returns the corresponding Hash instance.

Parameters:
formatted - the formatted string representing a Hash.
Returns:
the corresponding Hash instance.


Copyright © 2004-2014 The Apache Software Foundation. All Rights Reserved.