Class: Epuber::EncryptionHandler::EncryptionItem

Inherits:
Object
  • Object
show all
Defined in:
lib/epuber/from_file/encryption_handler.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(algorithm, file_path) ⇒ EncryptionItem

Returns a new instance of EncryptionItem.

Parameters:

  • algorithm (String)
  • file_path (String)


31
32
33
34
# File 'lib/epuber/from_file/encryption_handler.rb', line 31

def initialize(algorithm, file_path)
  @algorithm = algorithm
  @file_path = file_path
end

Instance Attribute Details

#algorithmString

Encryption algorithm (probably EncryptionHandler::ADOBE_OBFUSCATION or EncryptionHandler::IDPF_OBFUSCATION)

Returns:

  • (String)


14
15
16
# File 'lib/epuber/from_file/encryption_handler.rb', line 14

def algorithm
  @algorithm
end

#file_pathString

Absolute path to file (from root of EPUB)

Returns:

  • (String)


20
21
22
# File 'lib/epuber/from_file/encryption_handler.rb', line 20

def file_path
  @file_path
end

#keyString?

Encryption key for this file

Returns:

  • (String, nil)


26
27
28
# File 'lib/epuber/from_file/encryption_handler.rb', line 26

def key
  @key
end