Class Base64Format
- java.lang.Object
-
- org.apache.shiro.crypto.hash.format.Base64Format
-
- All Implemented Interfaces:
HashFormat
public class Base64Format extends Object implements HashFormat
HashFormatthat 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
Constructors Constructor Description Base64Format()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringformat(Hash hash)Returnshash != null ? hash.toBase64() : null.
-
-
-
Method Detail
-
format
public String format(Hash hash)
Returnshash != null ? hash.toBase64() : null.- Specified by:
formatin interfaceHashFormat- Parameters:
hash- the hash instance to format into a String.- Returns:
hash != null ? hash.toBase64() : null.
-
-