IPWorks Encrypt 2020 Python Edition

Questions / Feedback?

Blowfish Class

Properties   Methods   Events   Configuration Settings   Errors  

Encrypt and decrypt data with the Blowfish symmetric key block cipher.

Syntax

class ipworksencrypt.Blowfish

Remarks

The Blowfish component can be used to encrypt and decrypt data with the Blowfish symmetric key block cipher.

To begin simply specify the data you wish to encrypt or decrypt.

Input and Output Properties

The class will determine the source and destination of the input and output based on which properties are set.

The order in which the input properties are checked is as follows:

When a valid source is found the search stops. The order in which the output properties are checked is as follows:

Before encrypting you must have a valid key and iv. There are a few options available to you in regards to key management. The easiest option is to simply set key_password. When key_password is set the component will automatically create a key and iv using the PKCS5 password digest algorithm. This means there is only one value you need to keep track of.

If you wish to have more control over the key and iv values you may specify the properties yourself. If iv is left empty, one will be created for you when you call encrypt or decrypt.

A simple example:

Component.InputFile = "C:\MyFile.txt";
Component.OutputFile = "C:\Encrypted.txt";
Component.KeyPassword = "password";
Component.Encrypt();

Property List


The following is the full list of the properties of the class with short descriptions. Click on the links for further details.

cipher_modeThe cipher mode of operation.
input_fileThe file to process.
input_messageThe message to process.
ivThe initialization vector (IV).
keyThe secret key for the symmetric algorithm.
key_passwordA password to generate the Key and IV .
output_fileThe output file when encrypting or decrypting.
output_messageThe output message after processing.
overwriteIndicates whether or not the class should overwrite files.
padding_modeThe padding mode.
use_hexWhether input or output is hex encoded.

Method List


The following is the full list of the methods of the class with short descriptions. Click on the links for further details.

configSets or retrieves a configuration setting.
decryptDecrypts the data.
decrypt_blockDecrypts a block and returns the decrypted data.
encryptEncrypts the data.
encrypt_blockEncrypts data and returns the encrypted block.
resetResets the class.

Event List


The following is the full list of the events fired by the class with short descriptions. Click on the links for further details.

on_errorInformation about errors during data delivery.
on_progressFired as progress is made.

Configuration Settings


The following is a list of configuration settings for the class with short descriptions. Click on the links for further details.

BlockSizeThe block size, in bits, of the cryptographic operation.
IncludeIVWhether to prepend the IV to the output data and read the IV from the input data.
KeyPasswordAlgorithmThe hash algorithm used to derive the Key and IV from the KeyPassword property.
KeyPasswordIterationsThe number of iterations performed when using KeyPassword to derive the Key and IV.
KeyPasswordSaltThe salt value used in conjunction with the KeyPassword to derive the Key and IV.
KeySizeThe size, in bits, of secret key for the symmetric algorithm.
BuildInfoInformation about the product's build.
CodePageThe system code page used for Unicode to Multibyte translations.
LicenseInfoInformation about the current license.
ProcessIdleEventsWhether the class uses its internal event loop to process events when the main thread is idle.
SelectWaitMillisThe length of time in milliseconds the class will wait when DoEvents is called if there are no events to process.
UseInternalSecurityAPITells the class whether or not to use the system security libraries or an internal implementation.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks Encrypt 2020 Python Edition - Version 20.0 [Build 8155]