asked on
Public Function fSHA256Base64(s As String, k As String) As String
Dim lngLoop As Long
Dim oUTF, oEnc
Dim hmac() As Byte
Dim strText As String
Dim strTemp As String
12890 strText = s
12900 Set oUTF = CreateObject("System.Text.UTF8Encoding")
12910 Set oEnc = CreateObject("System.Security.Cryptography.HMACSHA256")
12920 oEnc.Key = oUTF.GetBytes_4(k)
12930 hmac = oEnc.ComputeHash_2(oUTF.GetBytes_4(s))
12940 strTemp = Base64Encode(hmac())
12950 fSHA256Base64 = strTemp
End Function
ASKER
Microsoft Access is a rapid application development (RAD) relational database tool. Access can be used for both desktop and web-based applications, and uses VBA (Visual Basic for Applications) as its coding language.
TRUSTED BY
Since these are basic function, I'm sure there is direct VBA code floating around (I'm sure there is for UTF8Encoding) and what I'd do is drop the .Net calls entirely and use the VBA Equivalents.
Jim.