Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.lucane.common.signature
Class Base64  view Base64 download Base64.java

java.lang.Object
  extended byorg.lucane.common.signature.Base64

class Base64
extends java.lang.Object

Handles Base64 enconding. Inspired by the Jakarta Project


Constructor Summary
(package private) Base64()
           
 
Method Summary
static byte[] decode(java.lang.String base64)
          Decode a string
static java.security.PrivateKey decodePrivateKey(java.lang.String base64)
          Decode a PrivateKey
static java.security.PublicKey decodePublicKey(java.lang.String base64)
          Decode a PublicKey
static java.lang.String encode(byte[] raw)
          Encodes a byte array
private static char[] encodeBlock(byte[] raw, int offset)
           
private static char[] encodeFullBlock(byte[] raw, int offset)
           
static java.lang.String encodeKey(java.security.Key key)
          Encode a Key in base64
private static char getChar(int sixBit)
           
private static int getValue(char c)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Base64

Base64()
Method Detail

encode

public static java.lang.String encode(byte[] raw)
Encodes a byte array


decode

public static byte[] decode(java.lang.String base64)
Decode a string


encodeKey

public static java.lang.String encodeKey(java.security.Key key)
Encode a Key in base64


decodePrivateKey

public static java.security.PrivateKey decodePrivateKey(java.lang.String base64)
                                                 throws SignatureException
Decode a PrivateKey


decodePublicKey

public static java.security.PublicKey decodePublicKey(java.lang.String base64)
                                               throws SignatureException
Decode a PublicKey


encodeBlock

private static char[] encodeBlock(byte[] raw,
                                  int offset)

encodeFullBlock

private static char[] encodeFullBlock(byte[] raw,
                                      int offset)

getChar

private static char getChar(int sixBit)

getValue

private static int getValue(char c)