mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-15 23:58:12 +08:00
calculate encryption key
This commit is contained in:
@ -69,11 +69,6 @@ namespace PdfWriter
|
||||
pObj = Get("P");
|
||||
if (pObj && pObj->GetType() == object_type_NUMBER)
|
||||
m_pEncrypt->SetPermission(((CNumberObject*)pObj)->Get());
|
||||
|
||||
pObj = Get("FileKey");
|
||||
if (pObj && pObj->GetType() == object_type_BINARY)
|
||||
m_pEncrypt->SetKey(((CBinaryObject*)pObj)->GetValue(), ((CBinaryObject*)pObj)->GetLength());
|
||||
Remove("FileKey");
|
||||
}
|
||||
CEncryptDict::~CEncryptDict()
|
||||
{
|
||||
@ -201,4 +196,8 @@ namespace PdfWriter
|
||||
CBinaryObject* pEncryptPerm = new CBinaryObject(m_pEncrypt->m_anPermEncrypt, 16);
|
||||
Add("Perms", pEncryptPerm);
|
||||
}
|
||||
void CEncryptDict::UpdateKey()
|
||||
{
|
||||
m_pEncrypt->UpdateKey();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user