org.apache.fontbox.cff

Class Type1FontUtil

public class Type1FontUtil extends Object

This class contains some helper methods handling Type1-Fonts.

Version: $Revision$

Author: Villu Russmann

Method Summary
static byte[]charstringDecrypt(byte[] buffer, int n)
Decrypt charstring.
static byte[]charstringEncrypt(byte[] buffer, int n)
Encrypt charstring.
static byte[]eexecDecrypt(byte[] buffer)
Decrypt eexec.
static byte[]eexecEncrypt(byte[] buffer)
Encrypt eexec.
static byte[]hexDecode(String string)
Converts a string representing a hex value into a byte array.
static StringhexEncode(byte[] bytes)
Converts a byte-array into a string with the corresponding hex value.

Method Detail

charstringDecrypt

public static byte[] charstringDecrypt(byte[] buffer, int n)
Decrypt charstring.

Parameters: buffer the given encrypted data n blocksize?

Returns: the decrypted data

charstringEncrypt

public static byte[] charstringEncrypt(byte[] buffer, int n)
Encrypt charstring.

Parameters: buffer the given data n blocksize?

Returns: the encrypted data

eexecDecrypt

public static byte[] eexecDecrypt(byte[] buffer)
Decrypt eexec.

Parameters: buffer the given encrypted data

Returns: the decrypted data

eexecEncrypt

public static byte[] eexecEncrypt(byte[] buffer)
Encrypt eexec.

Parameters: buffer the given data

Returns: the encrypted data

hexDecode

public static byte[] hexDecode(String string)
Converts a string representing a hex value into a byte array.

Parameters: string the string representing the hex value

Returns: the hex value as byte array

hexEncode

public static String hexEncode(byte[] bytes)
Converts a byte-array into a string with the corresponding hex value.

Parameters: bytes the byte array

Returns: the string with the hex value

Copyright © 2008-2011 Apache Software Foundation. All Rights Reserved.