com.vgrs.xcode.ext
Class DCE

java.lang.Object
  extended by com.vgrs.xcode.ext.DCE

public final class DCE
extends java.lang.Object

Makes a sequence of bytes compatible with the Domain Naming System. The algorithm uses the Base 32 encoding to create data on the range [a-z, 2-7]. Then data sequences longer than 63 characters are delimited using a FULLSTOP character.


Field Summary
static char DELIMITER
           
static int MAX_TOKEN_SIZE
           
 
Constructor Summary
DCE()
           
 
Method Summary
static byte[] decode(char[] input)
          Convert a dns-compatible string into array of bytes
static char[] encode(byte[] input)
          Convert array of bytes into a dns-compatible string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_TOKEN_SIZE

public static final int MAX_TOKEN_SIZE
See Also:
Constant Field Values

DELIMITER

public static final char DELIMITER
See Also:
Constant Field Values
Constructor Detail

DCE

public DCE()
Method Detail

encode

public static char[] encode(byte[] input)
                     throws XcodeException
Convert array of bytes into a dns-compatible string

Parameters:
input - sequence of bytes
Returns:
array of dns-compatible bytes
Throws:
XcodeException - if the input is null or empty

decode

public static byte[] decode(char[] input)
                     throws XcodeException
Convert a dns-compatible string into array of bytes

Parameters:
input - array of dns-compatible bytes
Returns:
sequence of bytes
Throws:
XcodeException - if the input is null or empty


Copyright © 2000-2010 VeriSign Inc. All Rights Reserved