Discuss this help topic in SecureBlackbox Forum

TElX509Certificate.DetectKeyFileFormat

TElX509Certificate     See also     


Filter: C#/Java  VB.NET  Pascal  C++  PHP  


Detects key format.

Declaration

[C#/Java]
    static int DetectKeyFileFormat(System.IO.Stream Stream, string Password);
    static int DetectKeyFileFormat(string FileName, string Password);
    static int DetectKeyFileFormat(byte[] Buffer, int Index, int Size, string Password);

[VB.NET]
    Shared Function DetectKeyFileFormat(ByVal Stream As System.IO.Stream, ByVal Password As String) As Integer
    Shared Function DetectKeyFileFormat(ByVal FileName As String, ByVal Password As String) As Integer
    Shared Function DetectKeyFileFormat(ByVal Buffer As Byte(), ByVal Index As Integer, ByVal Size As Integer, ByVal Password As String) As Integer

[Pascal]
    class function DetectKeyFileFormat(FileName : string; const Password : string): TSBX509KeyFileFormat;
    class function DetectKeyFileFormat(Stream : TStream; const Password : string): TSBX509KeyFileFormat;
    class function DetectKeyFileFormat(Buffer : pointer; Size: integer; const Password : string): TSBX509KeyFileFormat;

[C++]
    static TSBX509KeyFileFormat DetectKeyFileFormat(TStream &Stream, const std::string &Password);
    static TSBX509KeyFileFormat DetectKeyFileFormat(TStream *Stream, const std::string &Password);
    static TSBX509KeyFileFormat DetectKeyFileFormat(const std::string &FileName, const std::string &Password);
    static TSBX509KeyFileFormat DetectKeyFileFormat(void * Buffer, int32_t Size, const std::string &Password);

[PHP]
    integer DetectKeyFileFormat(TStream $Stream, string $Password)
    integer DetectKeyFileFormat(string $FileName, string $Password)
    integer DetectKeyFileFormat(TSBPointer|array of byte|string|NULL $Buffer, integer $Size, string $Password)

Parameters

  • FileName - name of the file containing key
  • Stream - stream containing key
  • Buffer - buffer containing key
  • Index - starting index of the key in Buffer
  • Size - size of the Buffer
  • Password - password to decrypt the key

Return value

    Returns the key file format.

Possible values:


Description

    This method detects format of the key (PFX, PEM, DER, PVK, NET, PKCS8).

See also:     DetectCertFileFormat    

Discuss this help topic in SecureBlackbox Forum