"babuhari123" wrote:See if this helps:
Hi friend,
I have one new requirement in my project I need to send parameter using MD5 format in rotransferURL is it possible in Roku,
if possible can any one send me one small snippet for me please........
Thanks in advance
ba1 = CreateOjbect("roByteArray")
' ...populate ba1...
ba2 = CreateObject("roByteArray")
ba2.FromAsciiString(somestring)
digest = CreateObject("roEVPDigest")
digest.Setup("md5")
digest.Update(ba1)
digest.Update(ba2)
result = digest.Final()
print result
digest = CreateObject("roEVPDigest")
digest.Setup("md5")
ba=CreateObject("roByteArray")
ba.FromAsciiString("10032012_salt")
digest.Update(ba)
key = digest.Final()
output.URL = domain + "?key=" + key + "&date=10032012"
digest.Update("10032012_salt")
'******************************
'* sign url with md5 hash
'******************************
function makemdfive(urltosign as string) as string
ba=createobject("robytearray")
dg=createobject("roevpDigest")
dg.setup("md5")
ba.fromasciistring(urltosign)
result=dg.process(ba)
return result
end function