Machina Client SDK Version 2.1.2
Ionic Security Machina Client SDK for Python users
Public Member Functions | Static Public Attributes | List of all members
ionicsdk.coverpage.CoverPageService Class Reference

Service object that provides cover pages to a File Cipher. More...

Inheritance diagram for ionicsdk.coverpage.CoverPageService:

Public Member Functions

def __init__ (self)
 Constructs a coverpage service with default values. More...
 
def GetCoverPage (self, filetype)
 Designed to be overridden. More...
 
def GetAccessDeniedPage (self, filetype)
 Designed to be overridden. More...
 

Static Public Attributes

int FILETYPE_UNKNOWN = 0,
 Enumeration constants for Filetype.
 
int FILETYPE_DOCX = 1
 Enumeration constants for Filetype.
 
int FILETYPE_PPTX = 2
 Enumeration constants for Filetype.
 
int FILETYPE_XLSX = 3
 Enumeration constants for Filetype.
 
int FILETYPE_DOCM = 4
 Enumeration constants for Filetype.
 
int FILETYPE_PPTM = 5
 Enumeration constants for Filetype.
 
int FILETYPE_XLSM = 6
 Enumeration constants for Filetype.
 
int FILETYPE_PDF = 7
 Enumeration constants for Filetype.
 
int FILETYPE_CSV = 8
 Enumeration constants for Filetype.
 

Detailed Description

Service object that provides cover pages to a File Cipher.

A user should sub class this object and override the GetCoverPage and GetAccessDeniedPage methods. Create an instance of their subclass and finally pass this instance into their cipher constructor. The cipher does not need a default instance passed to it. If no coverpage service is passed to the cipher, it will create a default service itself.

The overridden methods are called as needed and passed the file type. The method can return raw bytearray data for file types it recognizes and should return None otherwise. If None is returned, or the method is not overridden, then the coverpage service will fill in a default Ionic coverpage.

Constructor & Destructor Documentation

◆ __init__()

def ionicsdk.coverpage.CoverPageService.__init__ (   self)

Constructs a coverpage service with default values.

NOTE: This class is designed to be subclassed for custom implementations. Do not use the base class alone.

Member Function Documentation

◆ GetAccessDeniedPage()

def ionicsdk.coverpage.CoverPageService.GetAccessDeniedPage (   self,
  filetype 
)

Designed to be overridden.

Called by a Cipher when it attempts to decrypt a file and needs an access denied cover page data for the newly failed accessed file.

Parameters
filetype(int): The file type, compare to FILETYPE_DOCX, etc.. defined in this module.
Returns
The page data, or None if that page is not implemented in this class

◆ GetCoverPage()

def ionicsdk.coverpage.CoverPageService.GetCoverPage (   self,
  filetype 
)

Designed to be overridden.

Called by a Cipher when it needs to create a new file and needs cover page data for the newly encrypted file.

Parameters
filetype(int): The file type, compare to FILETYPE_DOCX, etc.. defined in this module.
Returns
The page data, or None if that page is not implemented in this class

The documentation for this class was generated from the following file: