ISE Production Code Functions jpeg_ise::decrypt_file(0)

NAME

jpeg_ise::decrypt_file()

SYNOPSIS

#include <ise.h>

int jpeg_ise::decrypt_file()

DESCRIPTION

jpeg_ise::decrypt_file()

The decrypt_file method will take a jpeg_ise file and selectively decrypt the Huffman Table frames found within the file.

If the output file already exists, the existing file will be overwritten. Otherwise, a new file will be created for the selectively decrypted jpeg image.

PRE-CONDITIONS

The input_file_name and key ise data members must be set using either the jpeg_ise() overloaded constructor or the set_input_file_name(char* name) and set_key(char* key) functions prior to calling this method.

This code requires that the input and output file pointers be at the head of the file.

POST-CONDITIONS

A decrypted file will be created with the name and path specified by the output_file_name data member.

If this data member is NULL, then a default file name will be created based upon the input_file_name data member.

RETURN VALUES

An integer is returned indicating a success or failure.

0 will indicate a success.

1 will indicate input file is not a jpeg ise file.

2 will indicate could not open ise file.

3 will indicate could not create output jpeg file.

4 will indicate could not open output jpeg file.

EXAMPLE USEAGE

// MyJpegIseObj must be of type jpeg_ise

// decrypt ise file to jpeg file

MyJpegIseObj.decrypt_file();

SEE ALSO

ise::ise(), jpeg_ise::jpeg_ise(), ise::set_input_file_name(), ise::set_output_file_name(), ise::set_key(), jpeg_ise::encrypt_file()

TEAM ISE Last Change: 15 April 2004