Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -255,10 +255,8 @@ public int getRevision()
* This will set the O entry in the standard encryption dictionary.
*
* @param o A 32 byte array or null if there is no owner key.
*
* @throws IOException If there is an error setting the data.
*/
public void setOwnerKey(byte[] o) throws IOException
public void setOwnerKey(byte[] o)
{
dictionary.setItem(COSName.O, new COSString(o));
}
Expand All @@ -267,10 +265,8 @@ public void setOwnerKey(byte[] o) throws IOException
* This will get the O entry in the standard encryption dictionary.
*
* @return A 32 byte array or null if there is no owner key.
*
* @throws IOException If there is an error accessing the data.
*/
public byte[] getOwnerKey() throws IOException
public byte[] getOwnerKey()
{
byte[] o = null;
COSString owner = (COSString) dictionary.getDictionaryObject( COSName.O );
Expand All @@ -294,10 +290,8 @@ else if (r == 5 || r == 6)
* This will set the U entry in the standard encryption dictionary.
*
* @param u A 32 byte array.
*
* @throws IOException If there is an error setting the data.
*/
public void setUserKey(byte[] u) throws IOException
public void setUserKey(byte[] u)
{
dictionary.setItem(COSName.U, new COSString(u));
}
Expand All @@ -306,10 +300,8 @@ public void setUserKey(byte[] u) throws IOException
* This will get the U entry in the standard encryption dictionary.
*
* @return A 32 byte array or null if there is no user key.
*
* @throws IOException If there is an error accessing the data.
*/
public byte[] getUserKey() throws IOException
public byte[] getUserKey()
{
byte[] u = null;
COSString user = (COSString) dictionary.getDictionaryObject( COSName.U );
Expand All @@ -333,10 +325,8 @@ else if (r == 5 || r == 6)
* This will set the OE entry in the standard encryption dictionary.
*
* @param oe A 32 byte array or null if there is no owner encryption key.
*
* @throws IOException If there is an error setting the data.
*/
public void setOwnerEncryptionKey(byte[] oe) throws IOException
public void setOwnerEncryptionKey(byte[] oe)
{
dictionary.setItem( COSName.OE, new COSString(oe) );
}
Expand All @@ -345,10 +335,8 @@ public void setOwnerEncryptionKey(byte[] oe) throws IOException
* This will get the OE entry in the standard encryption dictionary.
*
* @return A 32 byte array or null if there is no owner encryption key.
*
* @throws IOException If there is an error accessing the data.
*/
public byte[] getOwnerEncryptionKey() throws IOException
public byte[] getOwnerEncryptionKey()
{
byte[] oe = null;
COSString ownerEncryptionKey = (COSString)dictionary.getDictionaryObject( COSName.OE );
Expand All @@ -363,10 +351,8 @@ public byte[] getOwnerEncryptionKey() throws IOException
* This will set the UE entry in the standard encryption dictionary.
*
* @param ue A 32 byte array or null if there is no user encryption key.
*
* @throws IOException If there is an error setting the data.
*/
public void setUserEncryptionKey(byte[] ue) throws IOException
public void setUserEncryptionKey(byte[] ue)
{
dictionary.setItem( COSName.UE, new COSString(ue) );
}
Expand All @@ -375,10 +361,8 @@ public void setUserEncryptionKey(byte[] ue) throws IOException
* This will get the UE entry in the standard encryption dictionary.
*
* @return A 32 byte array or null if there is no user encryption key.
*
* @throws IOException If there is an error accessing the data.
*/
public byte[] getUserEncryptionKey() throws IOException
public byte[] getUserEncryptionKey()
{
byte[] ue = null;
COSString userEncryptionKey = (COSString)dictionary.getDictionaryObject( COSName.UE );
Expand Down Expand Up @@ -424,9 +408,8 @@ public boolean isEncryptMetaData()
* This will set the Recipients field of the dictionary. This field contains an array
* of string.
* @param recipients the array of bytes arrays to put in the Recipients field.
* @throws IOException If there is an error setting the data.
*/
public void setRecipients(byte[][] recipients) throws IOException
public void setRecipients(byte[][] recipients)
{
COSArray array = new COSArray();
for (byte[] recipient : recipients)
Expand Down