Dim Asc As Object, enc As Object
Dim TextToHash() As Byte
Dim SharedSecretKey() As Byte
Set Asc = CreateObject("System.Text.UTF8Encoding")
Set enc = CreateObject("System.Security.Cryptography.HMACSHA1")
Dim m As Mac
Dim k As KeyGenerator
Dim stUt As StringUtils
Dim st As String
k.Initialize("HMACSHA1")
k.KeyFromBytes("Secreto de firma de URL".GetBytes("UTF8"))
m.Initialise("HMACSHA1", k.Key)
m.Update("URL".GetBytes("UTF8"))
Dim b() As Byte
b = m.Sign
st = stUt.EncodeBase64(b)
Log(st)
But I don't get exactly the signature I need. I get:
2nzGLUE2HDdbH7/33iE4nAoPDLU=