Hi Debra,
>> Is this the correct usage?
outData = Clip(inData)
No, because now OutData is still space padded on the right. You then call st.SetValue, which is placing the unclipped OutData into the StringTheory object. You want to get the _clipped_ string into the StringTheory object.
dataLen = Len(Clip(outData)) ! Text data, so we are clipping it. For binary data it would not be clipped
st.SetValue(outdata,st:clip)
Crypto.MakeHMAC(st,clip(password),cs:CALG_SHA_256)
outData =st.GetValue()
>> Also is it a correct assumption that this is hex, so I need to follow it up with a
st.Base64Encode()
No, the Base64 encode function encodes using the Base64 alphabet. That's not the same as the Hex alphabet. The correct method to call yould be st.ToHex, but this is unnecessary because the 4th parameter of MakeHMAC (which defaults to true) will automatically make that call for you. So the result of the call to MakeHMAC as detailed above will return the value already as a "hex encoded string".
Cheers
Bruce