The object created for 'enc' is void of all variables. Seems to be an empty object. I have both 'mscorlib.dll' and 'System' checked off as references. I assume it is some sort of pathway problem but I have no idea on how to fix this.
Private Function HEX_HMACSHA1(ByVal sTextToHash As String, ByVal sSharedSecretKey As String) As String
'Dim Asc As Object
Dim enc As Object
Dim TextToHash() As Byte
Dim SharedSecretKey() As Byte
Dim bytes() As Byte
Dim sHexString As String
Dim i As Long
'Set Asc = CreateObject("System.Text.UTF8Encoding")
Set enc = CreateObject("System.Security.Cryptography.HMACSHA1")
TextToHash = HexStringToByteArray(sTextToHash)
SharedSecretKey = HexStringToByteArray(sSharedSecretKey)
enc.Key = SharedSecretKey
bytes = enc.ComputeHash_2((TextToHash))
HEX_HMACSHA1 = ByteArrayToHexStr(bytes)
'Set Asc = Nothing
Set enc = Nothing
End Function
Private Function HEX_HMACSHA1(ByVal sTextToHash As String, ByVal sSharedSecretKey As String) As String
'Dim Asc As Object
Dim enc As Object
Dim TextToHash() As Byte
Dim SharedSecretKey() As Byte
Dim bytes() As Byte
Dim sHexString As String
Dim i As Long
'Set Asc = CreateObject("System.Text.UTF8Encoding")
Set enc = CreateObject("System.Security.Cryptography.HMACSHA1")
TextToHash = HexStringToByteArray(sTextToHash)
SharedSecretKey = HexStringToByteArray(sSharedSecretKey)
enc.Key = SharedSecretKey
bytes = enc.ComputeHash_2((TextToHash))
HEX_HMACSHA1 = ByteArrayToHexStr(bytes)
'Set Asc = Nothing
Set enc = Nothing
End Function