Helps to create code

Help to create code for use in the same brs

    $mysecretkey = "mysecretkey";
    $expiry = strtotime("+1 hour");
    $b64 = base64_encode(md5($mysecretkey.$expiry,true));
    $b64u = rtrim(str_replace(array('+','/'),array('-','_'),$b64),'=');
    echo "http://sample.com/$path?e=$expiry&st=$b64u\n";

I’m trying with this but I have no result

dateNow=CreateObject("roDateTime")
dateNow=dateNow.asSeconds()+200 

ba1 = CreateObject("roByteArray")
ba1.FromAsciiString("claveprivada"+dateNow)
digest = CreateObject("roEVPDigest")
digest.Setup("md5")
digest.Update(ba1)
hash = digest.Final()
print "Hash => "; hash

ba2 = CreateObject("roByteArray") 
ba2.FromAsciiString(hash)
usableHash = ba2.ToBase64String()
print "UsableHash => "; usableHash

alguien tendría una idea