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

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

public class Base64Format
extends Object
implements HashFormat

HashFormat that outputs only the hash's digest bytes in Base64 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
Base64Format()
           
 
Method Summary
 String format(Hash hash)
          Returns hash != null ? hash.toBase64() : null.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Base64Format

public Base64Format()
Method Detail

format

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

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


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