tori.common

Author:Juti Noppornpitak

This package contains classes and functions for common use.

class tori.common.Enigma

Hashlib wrapper

hash(*data_list)

Make a hash out of the given value.

Parameters:data_list (list of string) – the list of the data being hashed.
Returns:the hashed data string
static instance()

Get a singleton instance.

Note

This class is capable to act as a singleton class by invoking this method.

class tori.common.Finder

File System API Wrapper

read(file_path, is_binary=False)

Read a file from file_path.

By default, read a file normally. If is_binary is True, the method will read in binary mode.