class

HexaPDF::Encryption::ARC4

Inherits Reference < Object

Iplementation of the general encryption algorithm ARC4.

See: PDF1.7 s7.6.2

Constants

INITIAL_STATE = Bytes.new(256)

The initial state which is then modified by the key-scheduling algorithm

Constructors

new(key : Bytes)

Creates a new ARC4 object using the given encryption key.

Source

Class methods

decrypt(key, data)
Source
encrypt(key, data)

Encrypts the given +data+ with the +key+.

See: PDF1.7 s7.6.2.

Source

Instance methods

process(data : Bytes)

Processes the given data.

Since this is a symmetric algorithm, the same method can be used for encryption and decryption.

Source