class PDF::Reader::SecurityHandlerFactory

def self.standard?(encrypt)

This handler supports all encryption that follows upto PDF 1.5 spec (revision 4)
def self.standard?(encrypt)
  return false if encrypt.nil?
  filter = encrypt.fetch(:Filter, :Standard)
  version = encrypt.fetch(:V, 0)
  algorithm = encrypt.fetch(:CF, {}).fetch(encrypt[:StmF], {}).fetch(:CFM, nil)
  (filter == :Standard) && (encrypt[:StmF] == encrypt[:StrF]) &&
    (version <= 3 || (version == 4 && ((algorithm == :V2) || (algorithm == :AESV2))))
end