Method: PDF::Reader::StandardSecurityHandler#decrypt

Defined in:
lib/pdf/reader/standard_security_handler.rb

#decrypt(buf, ref) ⇒ Object

7.6.2 General Encryption Algorithm

Algorithm 1: Encryption of data using the RC4 or AES algorithms

used to decrypt RC4/AES encrypted PDF streams (buf)

buf - a string to decrypt ref - a PDF::Reader::Reference for the object to decrypt



88
89
90
91
92
93
94
95
# File 'lib/pdf/reader/standard_security_handler.rb', line 88

def decrypt( buf, ref )
  case @cfm
    when :AESV2
      decrypt_aes128(buf, ref)
    else
      decrypt_rc4(buf, ref)
  end
end