Extension talk:QISSingleSignOn

Jump to navigation Jump to search

About this board

archive of old talk


DotNet VB Code to generate a URL

1
212.91.225.218 (talkcontribs)

Private Function GenerateWikiURL(domain As String, version As String, service As String, username As String, subpage As String) As String

        Dim qqa As System.Security.Cryptography.MD5 = System.Security.Cryptography.MD5.Create

        Dim secret As String = "kahC1oo3pieg6FaekEhou1aipEivae4fe"

        Dim preURL As String = String.Format("{0}/{1}/{2}/{3}/", version, CInt(DateTime.UtcNow.Subtract(New DateTime(1970, 1, 1)).TotalSeconds).ToString, service, username)

        Dim data As Byte() = qqa.ComputeHash(System.Text.Encoding.UTF8.GetBytes(preURL & secret))

        Dim sBuilder As New Text.StringBuilder()

        For i As Integer = 0 To data.Length - 1

            sBuilder.Append(data(i).ToString("x2"))

        Next

        Return String.Format("{0}/{1}?qisssotoken={2}", domain, subpage, preURL & sBuilder.ToString)

    End Function

Reply to "DotNet VB Code to generate a URL"
212.91.225.218 (talkcontribs)

I had problems with 'UserLoadFromSession' with an Invalid argument exception.

I killed the line 211

session_start();

It run well.

Reply to "mediawiki 1.30"
There are no older topics