Rc4Cipher
in package
implements
CryptInterface
FinalYes
RC4 stream cipher for legacy PDF encryption (PDF 1.1–1.5).
Encrypt and decrypt are the same XOR operation. Retained for reading older PDFs — AES should be used for all new documents.
Table of Contents
Interfaces
- CryptInterface
- Symmetric cipher contract for PDF stream/string encryption.
Methods
Methods
decrypt()
public
decrypt(string $data, string $key) : string
Parameters
- $data : string
- $key : string
Return values
stringencrypt()
public
encrypt(string $data, string $key) : string
Parameters
- $data : string
- $key : string