SECCryptoFile::Open

BOOLSECCryptoFile::Open(const TCHAR*pszFileName, const TCHAR*pszPassword, UINTnOpenFlags, eModeCipherMode, CFileException*p= NULL)

Opens an SECCryptoFile with a path, password, direction and en/decryption mode.

Defined in: CRYPTFIL.CPP

Return Value

Nonzero if the open was successful; otherwise 0. The p parameter is meaningful only if 0 is returned.

Parameters

pszFileName

A string that is the path to the desired file. The path may be relative or absolute.

pszPassword

Plaintext password for the SECCryptoFile.

nOpenFlags

Sharing and access mode. Specifies the action to take when opening the file.

CipherMode

Mode of SECCryptoFile, can be either SECCryptoFile::ECB or SECCryptoFile::OFB.

Comments

Open is designed for use with the default SECCryptoFile constructor. The two functions form a "safe" method for opening a file where a failure is a normal, expected condition. The constructor is guaranteed to succeed, and Open returns a pointer to an exception object, bypassing the THROW/TRY/CATCH mechanism.

p

A pointer to an existing file-exception object that indicates the completion status of the open operation.

See Also

SECCryptoFile  SECCryptoFile