@Override protected void generateContent() { content = encodeBytes(getValueBytes()); }
/** * Encrypt content of {@code value} and set as content. {@code generateContent()} won't be called. * * @param encrypt @see PdfEncryption * @return true if value was encrypted, otherwise false. */ protected boolean encrypt(PdfEncryption encrypt) { if (checkState(PdfObject.UNENCRYPTED)) { return false; } if (encrypt != decryption) { if (decryption != null) { generateValue(); } if (encrypt != null && !encrypt.isEmbeddedFilesOnly()) { byte[] b = encrypt.encryptByteArray(getValueBytes()); content = encodeBytes(b); return true; } } return false; }