sg.edu.nyp.drmPublisher
Class Base64Codec

java.lang.Object
  extended bysg.edu.nyp.drmPublisher.Base64Codec

public class Base64Codec
extends java.lang.Object

Author:
Pierre Trocme

Constructor Summary
Base64Codec()
           
 
Method Summary
static byte[] decodeBase64(char[] toDecode)
          Decode a base64 encoded cvhar array.
static char[] encodeBase64(byte[] toConvert)
          Convert a byte sequence into its Base64 encoded form.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Base64Codec

public Base64Codec()
Method Detail

encodeBase64

public static char[] encodeBase64(byte[] toConvert)
Convert a byte sequence into its Base64 encoded form.

Parameters:
toConvert - The byte sequence to encode
Returns:
the Base64 encoded form

decodeBase64

public static byte[] decodeBase64(char[] toDecode)
Decode a base64 encoded cvhar array.

Parameters:
toDecode - the char array to decode
Returns:
the byte array of decoded datas