Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 430209
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T19:51:09+00:00 2026-05-12T19:51:09+00:00

Does anyone have a working class or function to create the hashed email that

  • 0

Does anyone have a working class or function to create the hashed email that is sent to facebook to register email addresses with connect.registerUsers?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T19:51:09+00:00Added an answer on May 12, 2026 at 7:51 pm

    figured this out on my own

    Imports System.Net

    Imports tb2CoreLib

    Imports Microsoft.Xml.Schema.Linq

    Imports System.Security.Cryptography

    Imports facebook.Utility

    Imports Microsoft.Xml

    Imports System.Xml

    Imports System.Web

    Public Class FacebookConnect

    Public Function EmailHash(ByVal email As String) As String

        email = email.ToLower().Trim()
        Dim rawBytes As Byte() = System.Text.UTF8Encoding.UTF8.GetBytes(email)
    
        Dim crc As New Crc32()
        Dim crcResult As Byte() = crc.ComputeHash(rawBytes)
        Dim hexstring As String = Me.ToHexString(crcResult)
    
        Dim crcLResult As Long = Me.HexToDec(hexstring)
    
        Dim md5 As MD5 = New MD5CryptoServiceProvider()
        Dim md5Result As Byte() = md5.ComputeHash(rawBytes)
        Dim md5Data As String = Me.ToHexString(md5Result).ToLower()
    
        Return (crcLResult.ToString() & "_") + md5Data
    End Function
    

    end class

    Imports System

    Imports System.Security.Cryptography

    Public Class Crc32

    Inherits HashAlgorithm
    
    Public Const DefaultPolynomial As UInt32 = &HEDB88320UI
    
    Public Const DefaultSeed As UInt32 = &HFFFFFFFFUI
    
    Private Shadows hash As UInt32
    Private seed As UInt32
    Private table As UInt32()
    Private Shared defaultTable As UInt32()
    
    Public Sub New()
        table = InitializeTable(DefaultPolynomial)
        seed = DefaultSeed
        Initialize()
    End Sub
    
    Public Sub New(ByVal polynomial As UInt32, ByVal seed As UInt32)
        table = InitializeTable(polynomial)
        Me.seed = seed
        Initialize()
    End Sub
    
    Public Overloads Overrides Sub Initialize()
        hash = seed
    End Sub
    
    Protected Overloads Overrides Sub HashCore(ByVal buffer As Byte(), ByVal start As Integer, ByVal length As Integer)
        hash = CalculateHash(table, hash, buffer, start, length)
    End Sub
    
    Protected Overloads Overrides Function HashFinal() As Byte()
        Dim hashBuffer As Byte() = UInt32ToBigEndianBytes(Not hash)
        Me.HashValue = hashBuffer
        Return hashBuffer
    End Function
    
    Public Overloads Overrides ReadOnly Property HashSize() As Integer
        Get
            Return 32
        End Get
    End Property
    
    Public Shared Function Compute(ByVal buffer As Byte()) As UInt32
        Return Not CalculateHash(InitializeTable(DefaultPolynomial), DefaultSeed, buffer, 0, buffer.Length)
    End Function
    
    Public Shared Function Compute(ByVal seed As UInt32, ByVal buffer As Byte()) As UInt32
        Return Not CalculateHash(InitializeTable(DefaultPolynomial), seed, buffer, 0, buffer.Length)
    End Function
    
    Public Shared Function Compute(ByVal polynomial As UInt32, ByVal seed As UInt32, ByVal buffer As Byte()) As UInt32
        Return Not CalculateHash(InitializeTable(polynomial), seed, buffer, 0, buffer.Length)
    End Function
    
    Private Shared Function InitializeTable(ByVal polynomial As UInt32) As UInt32()
        If polynomial = DefaultPolynomial AndAlso defaultTable IsNot Nothing Then
            Return defaultTable
        End If
    
        Dim createTable As UInt32() = New UInt32(255) {}
        For i As UInt32 = 0 To 255
            Dim entry As UInt32 = DirectCast(i, UInt32)
            For j As Integer = 0 To 7
                If (entry And 1) = 1 Then
                    entry = (entry >> 1) Xor polynomial
                Else
                    entry = entry >> 1
                End If
            Next
            createTable(i) = entry
        Next
    
        If polynomial = DefaultPolynomial Then
            defaultTable = createTable
        End If
    
        Return createTable
    End Function
    
    Private Shared Function CalculateHash(ByVal table As UInt32(), ByVal seed As UInt32, ByVal buffer As Byte(), ByVal start As Integer, ByVal size As Integer) As UInt32
        Dim crc As UInt32 = seed
        For i As Integer = start To size - 1
            crc = (crc >> 8) Xor table(buffer(i) Xor crc And &HFF)
    
        Next
        Return crc
    End Function
    
    Private Function UInt32ToBigEndianBytes(ByVal x As UInt32) As Byte()
        Return New Byte() {CByte(((x >> 24) And &HFF)), CByte(((x >> 16) And &HFF)), CByte(((x >> 8) And &HFF)), CByte((x And &HFF))}
    End Function
    

    End Class

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 230k
  • Answers 230k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer In general, to override generated templates with your own, you… May 13, 2026 at 2:03 am
  • Editorial Team
    Editorial Team added an answer Instead of closing and reopening file this way (I'm not… May 13, 2026 at 2:03 am
  • Editorial Team
    Editorial Team added an answer Thank you all for helping me see my problem more… May 13, 2026 at 2:03 am

Related Questions

Could anyone suggest books or materials to learn unit test? Some people consider codes
A coworker has been using a custom AVI to indicate progress during some longer
I have a bit of simple created with XAJAX, which replaces the innner HTML
I have a public property set in my form of type ListE<T> where: public

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.