Private Declare Function ArrPtr Lib "msvbvm60" Alias "VarPtr" (Arr() As Any) As Long
Private Declare Sub PutMem4 Lib "msvbvm60" (ByVal Ptr As Long, ByVal Value As Long)
Private Declare Function SysAllocStringByteLen Lib "oleaut32" (ByVal Ptr As Long, ByVal Length As Long) As Long
Private Declare Function SysAllocStringLen Lib "oleaut32" (ByVal Ptr As Long, ByVal Length As Long) As Long
Private LH(0 To 5) As Long, LHP As Long
Private LA() As Long, LP As Long
Private IH(0 To 5) As Long, IHP As Long
Private IA() As Integer, IP As Long
Private LH_(0 To 5) As Long, LHP_ As Long
Private LA_() As Long, LP_ As Long
Private BHex(0 To 511) As Long, BHexI As Boolean
' a very advanced function: allows for many kinds of formatting options and it is very fast too
Public Function BytesToHexString_F1(Bytes() As Byte, Optional Format As String = CRYPT_HEX_FORMAT, Optional Separator As String = vbNewLine, Optional ByVal Lowercase As Boolean = True) As String
Dim BytesBase As Long, BytesPtr As Long, StringPtr As Long
Dim C As Long, CH As Long, CL As Long, CS As Long, F() As Long, I As Long, J As Long, L As Long, LF As Long, LS As Long, P As Long
' get pointer to safe array header
BytesPtr = Not Not Bytes: Debug.Assert App.hInstance