MBPDF #13
MbarkT3STO
started this conversation in
Classes
MBPDF
#13
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Definition :
For a special encryption and decryption for PDF files
State :
Static class
Methods :
Encrypt
PDFEncryptionModel
EncryptWithoutKey
PDFEncryptionModel
Decrypt
PDFDecryptionModel
DecryptWithoutKey
EncryptWithoutKey
methodPDFDecryptionModel
Details :
Encrypt
Encrypt a PDF file using a custom Key and/or IV
1st three overloads
Byte[]
Byte[]
Byte[]
2nd three overloads
String
Byte[]
Byte[]
EncryptWithoutKey
Encrypt a PDF file without Key and IV
1st Overload
Byte[]
2nd Overload
String
Decrypt
Decrypt an encrypted PDF file bytes using a custom Key and/or IV used in the encryption operation
Byte[]
Byte[]
Byte[]
Key
parameter in decryption should converted frombase 64 string
tobytes
, to do that when sending the key use.FromBase64ToBytes()
extension method provided by MBSecurity.DecryptWithoutKey
Decrypt a PDF file already encrypted using
EncryptWithoutKey
methodByte[]
Important notes
DecryptWithoutKey
method, if you encrypt your data usingEncryptWithoutKey
Encrypt
orEncryptWithoutKey
you will get a value typePDFEncryptionModel
has two properties (Key
andEncryptedBytes
)Key
is your or auto-generated key used in encryptionKey
returned after encryption is encryptedBeta Was this translation helpful? Give feedback.
All reactions