CryptoSys PKI Pro Manual

cnvNumToBytes

Convert a 32-bit integer to an array of 4 bytes.

Syntax

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

Parameters

nNumber
Integer 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

Byte(): Byte array containing representation of integer in given order.

Example

Debug.Print cnvToHex(cnvNumToBytes(&HDEADBEEF, PKI_CNV_LITTLE_ENDIAN))
'EFBEADDE
[PREV: cnvNumFromBytes...]   [Contents]   [Index]   
   [NEXT: cnvReverseBytes...]

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