class HexaPDF::Encryption::FastARC4

See: PDF2.0 s7.6.3
Implementation of the general encryption algorithm ARC4 using OpenSSL as backend.

def initialize(key)

Creates a new FastARC4 object using the given encryption key.
def initialize(key)
  @cipher = OpenSSL::Cipher.new('rc4')
  @cipher.key_len = key.length
  @cipher.key = key
end

def process(data)

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

Processes the given data.
def process(data)
  @cipher.update(data)
end