"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "fontbox/src/main/java/org/apache/fontbox/cff/Type1FontUtil.java" between
pdfbox-2.0.23-src.zip and pdfbox-2.0.24-src.zip

About: Apache PDFBox is a Java PDF library tool that allows creation of new PDF documents, manipulation of existing documents and the ability to extract content from documents.

Type1FontUtil.java  (pdfbox-2.0.23-src):Type1FontUtil.java  (pdfbox-2.0.24-src)
skipping to change at line 97 skipping to change at line 97
*/ */
public static byte[] charstringEncrypt(byte[] buffer, int n) public static byte[] charstringEncrypt(byte[] buffer, int n)
{ {
return encrypt(buffer, 4330, n); return encrypt(buffer, 4330, n);
} }
private static byte[] encrypt(byte[] plaintextBytes, int r, int n) private static byte[] encrypt(byte[] plaintextBytes, int r, int n)
{ {
byte[] buffer = new byte[plaintextBytes.length + n]; byte[] buffer = new byte[plaintextBytes.length + n];
for (int i = 0; i < n; i++)
{
buffer[i] = 0;
}
System.arraycopy(plaintextBytes, 0, buffer, n, buffer.length - n); System.arraycopy(plaintextBytes, 0, buffer, n, buffer.length - n);
int c1 = 52845; int c1 = 52845;
int c2 = 22719; int c2 = 22719;
byte[] ciphertextBytes = new byte[buffer.length]; byte[] ciphertextBytes = new byte[buffer.length];
for (int i = 0; i < buffer.length; i++) for (int i = 0; i < buffer.length; i++)
{ {
int plain = buffer[i] & 0xff; int plain = buffer[i] & 0xff;
 End of changes. 1 change blocks. 
5 lines changed or deleted 0 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)