org.apache.shiro.crypto.hash.format
Class HexFormat

java.lang.Object
  extended by org.apache.shiro.crypto.hash.format.HexFormat
All Implemented Interfaces:
HashFormat

public class HexFormat
extends Object
implements HashFormat

HashFormat that outputs only The hash's digest bytes in hex format. It does not print out anything else (salt, iterations, etc). This implementation is mostly provided as a convenience for command-line hashing.

Since:
1.2

Constructor Summary
HexFormat()
           
 
Method Summary
 String format(Hash hash)
          Returns hash != null ? hash.toHex() : null.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HexFormat

public HexFormat()
Method Detail

format

public String format(Hash hash)
Returns hash != null ? hash.toHex() : null.

Specified by:
format in interface HashFormat
Parameters:
hash - the hash instance to format into a String.
Returns:
hash != null ? hash.toHex() : null.


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