com.lambdaworks.codec
Class Base16
java.lang.Object
com.lambdaworks.codec.Base16
public class Base16
- extends Object
High-performance base16 (AKA hex) codec.
- Author:
- Will Glozer
|
Method Summary |
static byte[] |
decode(char[] src)
Decode base16 chars to bytes. |
static char[] |
encode(byte[] src,
boolean upper)
Encode bytes to base16 chars. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Base16
public Base16()
encode
public static char[] encode(byte[] src,
boolean upper)
- Encode bytes to base16 chars.
- Parameters:
src - Bytes to encode.upper - Use upper or lowercase chars.
- Returns:
- Encoded chars.
decode
public static byte[] decode(char[] src)
- Decode base16 chars to bytes.
- Parameters:
src - Chars to decode.
- Returns:
- Decoded bytes.
Copyright © 2013. All Rights Reserved.