module HexaPDF::Encryption::ARC4::ClassMethods
def encrypt(key, data)
Encrypts the given +data+ with the +key+.
def encrypt(key, data) new(key).process(data) end
def encryption_fiber(key, source)
Returns a Fiber object that encrypts the data from the given source fiber with the
def encryption_fiber(key, source) Fiber.new do algorithm = new(key) while source.alive? && (data = source.resume) Fiber.yield(algorithm.process(data)) unless data.empty? end end end