CryptoSys PKI Pro Manual

PEM_FileFromBinFileEx

Creates a PEM file from a binary file with extended options.

VBA/VB6 Syntax

Public Declare Function PEM_FileFromBinFileEx Lib "diCrPKI.dll" (ByVal strOutputFile As String, ByVal strFileIn As String, ByVal strHeader As String, ByVal nLineLen As Long, ByVal nOptions As Long) As Long

nRet = PEM_FileFromBinFileEx(strOutputFile, strFileIn, strHeader, nLineLen, nOptions)

C/C++ Syntax

long __stdcall PEM_FileFromBinFileEx(const char *szFileOut, const char *szFileIn, const char *szHeader, long nLineLen, long nOptions);

Parameters

szFileOut
[in] with name of output file to be created.
szFileIn
[in] with the filename of the binary file to be converted.
szHeader
[in] specifying the header to be used. Leave empty to omit the PEM header and footer.
nLineLen
[in] the maximum length of a line in the resulting PEM file (default = 64 characters).
nOptions
[in] option flags:
PKI_DEFAULT (0) for default options
PKI_KEY_FORMAT_SSL to create the output file with Unix/SSL line endings (default = Windows CR-LF line endings)

Returns (VBA/C)

If successful, the return value is zero; otherwise it returns a nonzero error code.

.NET Equivalent

Pem.FileFromBinFile Method Pem.FileFromBinFile Method

Python Equivalent

static Pem.from_binfile(outputfile, filein, header, linelen=64, eol=EOL.DEFAULT)

Remarks

See the remarks for PEM_FileFromBinFile(). This extension was added to create PEM format files compatible with those created by Open SSL, which uses Unix line endings (a single LF character as opposed to the CR-LF pair used in Windows files).

Example

See Also

PEM_FileFromBinFile PEM_FileToBinFile

[Contents] [Index]

[PREV: PEM_FileFromBinFile...]   [Contents]   [Index]   
   [NEXT: PEM_FileToBinFile...]

Copyright © 2004-24 D.I. Management Services Pty Ltd. All rights reserved. Generated 2024-09-23T07:52:09Z.