CryptoSys PKI Pro Manual

cnvNumFromBytes

Convert the leftmost four bytes of an array to a 32-bit integer.

Syntax

[VBA]
Public Function cnvNumFromBytes ( _
    lpInput() As Byte, _
    Optional nOptions As Long = 0 _
) As Long

Parameters

lpInput
Byte array to be converted.
nOptions
Option flags. Use 0 for default big-endian order or one of:
PKI_CNV_BIG_ENDIAN (0)
PKI_CNV_LITTLE_ENDIAN

Return Value

Long: Decoded integer value.

Remarks

An array shorter than 4 bytes will be padded on the right with zeros.

Example

Debug.Print Hex(cnvNumFromBytes(cnvFromHex("DEADBEEF")))
'DEADBEEF
Debug.Print cnvNumFromBytes(cnvFromHex("DEADBEEF"))
'-559038737
[PREV: cnvLatin1FromUTF8Bytes...]   [Contents]   [Index]   
   [NEXT: cnvNumToBytes...]

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