ISE Production Code Functions jpeg_ise::encrypt_file(0)

NAME

jpeg_ise::encrypt_file()

SYNOPSIS

#include <ise.h>

int jpeg_ise::encrypt_file()

DESCRIPTION

jpeg_ise::encrypt_file()

The encrypt_file() method will take a standard baseline compression jpeg file and selectively encrypt the Huffman Table frames found within the file.

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

PRE-CONDITIONS

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

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

POST-CONDITIONS

An encrypted 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 could not open input file name.

2 will indicate could not create ise file name.

3 will indicate could not open ise file.

EXAMPLE USEAGE

// MyJpegIseObj must be of type jpeg_ise

// encrypt jpeg file to ise file

MyJpegIseObj.encrypt_file();

SEE ALSO

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

TEAM ISE Last Change: 15 April 2004