class PDF::Reader::StandardKeyBuilder
def initialize(opts = {})
def initialize(opts = {}) @key_length = opts[:key_length].to_i/8 @revision = opts[:revision].to_i @owner_key = opts[:owner_key] @user_key = opts[:user_key] @permissions = opts[:permissions].to_i @encryptMeta = opts.fetch(:encrypted_metadata, true) @file_id = opts[:file_id] || "" if @key_length != 5 && @key_length != 16 msg = "StandardKeyBuilder only supports 40 and 128 bit\ encryption (#{@key_length * 8}bit)" raise UnsupportedFeatureError, msg end end