Click here to Skip to main content
15,913,610 members
Home / Discussions / C#
   

C#

 
QuestionRetrieving Image from database... Pin
sandhya146-Jan-09 0:24
sandhya146-Jan-09 0:24 
QuestionHow to convert PPT files to JPEG files. Pin
NarVish6-Jan-09 0:10
NarVish6-Jan-09 0:10 
AnswerRe: How to convert PPT files to JPEG files. Pin
«_Superman_»6-Jan-09 0:21
professional«_Superman_»6-Jan-09 0:21 
QuestionMs access database Pin
raj2313625-Jan-09 23:52
raj2313625-Jan-09 23:52 
QuestionMD5 algorithm issue Pin
George_George5-Jan-09 23:10
George_George5-Jan-09 23:10 
AnswerRe: MD5 algorithm issue Pin
Tom Deketelaere6-Jan-09 0:15
professionalTom Deketelaere6-Jan-09 0:15 
GeneralRe: MD5 algorithm issue Pin
George_George6-Jan-09 0:28
George_George6-Jan-09 0:28 
GeneralRe: MD5 algorithm issue Pin
Tom Deketelaere6-Jan-09 1:36
professionalTom Deketelaere6-Jan-09 1:36 
George_George wrote:
MD5 hashing returns byte[] other than numeric value in C#. Please feel free to correct me if I am wrong.


Like I said 'if memory serves me right' so could be been a while since I looked into the hashing.
So I could be wrong about that Smile | :)

(just found some code I used a while ago for the md5 hashing)
Public Shared Function GetMD5Encrypted(ByVal input As String) As String
        Dim md5hasher As MD5CryptoServiceProvider = New MD5CryptoServiceProvider()
        Dim hashedbytes() As Byte
        Dim encoder As New UTF8Encoding()

        hashedbytes = md5hasher.ComputeHash(encoder.GetBytes(input.ToCharArray()))
        Dim hashedstring As String = Nothing
        For Each i As Integer In hashedbytes
            hashedstring = hashedstring + i.ToString
        Next
        Return hashedstring
    End Function

(sorry about the vb.net language but you should be able to convert it)
I think this one only returns numeric values, but you might want to check that first.

George_George wrote:
"you could just make the sum off the bytes" -- interested in this. Any more details or pseudo code?


Don't really have any code for it, it was just my first thought and what I would try to do first. (but if there only numeric values in the hash it's simple, if not you'll probably have to do a check if the byte is numeric or not if not you could use the Asci value of the char or something else)
GeneralRe: MD5 algorithm issue Pin
George_George10-Jan-09 2:29
George_George10-Jan-09 2:29 
GeneralRe: MD5 algorithm issue Pin
Tom Deketelaere11-Jan-09 21:28
professionalTom Deketelaere11-Jan-09 21:28 
AnswerRe: MD5 algorithm issue Pin
Abhijit Jana6-Jan-09 1:28
professionalAbhijit Jana6-Jan-09 1:28 
GeneralRe: MD5 algorithm issue Pin
George_George10-Jan-09 2:23
George_George10-Jan-09 2:23 
AnswerRe: MD5 algorithm issue Pin
DaveyM696-Jan-09 10:55
professionalDaveyM696-Jan-09 10:55 
GeneralRe: MD5 algorithm issue Pin
George_George10-Jan-09 2:21
George_George10-Jan-09 2:21 
GeneralRe: MD5 algorithm issue Pin
DaveyM6910-Jan-09 8:36
professionalDaveyM6910-Jan-09 8:36 
AnswerRe: MD5 algorithm issue Pin
Jon Rista6-Jan-09 14:40
Jon Rista6-Jan-09 14:40 
GeneralRe: MD5 algorithm issue Pin
George_George10-Jan-09 2:25
George_George10-Jan-09 2:25 
GeneralRe: MD5 algorithm issue Pin
Jon Rista10-Jan-09 13:24
Jon Rista10-Jan-09 13:24 
AnswerRe: MD5 algorithm issue Pin
Hamid_RT15-Jan-09 2:24
Hamid_RT15-Jan-09 2:24 
QuestionSQL Merge Pin
ellllllllie5-Jan-09 23:03
ellllllllie5-Jan-09 23:03 
AnswerRe: SQL Merge Pin
Wendelius5-Jan-09 23:42
mentorWendelius5-Jan-09 23:42 
AnswerRe: SQL Merge Pin
SeMartens5-Jan-09 23:44
SeMartens5-Jan-09 23:44 
QuestionWho is coneected with My Mechine Pin
nidheeshkayal5-Jan-09 22:52
nidheeshkayal5-Jan-09 22:52 
AnswerRe: Who is coneected with My Mechine Pin
rah_sin5-Jan-09 23:24
professionalrah_sin5-Jan-09 23:24 
GeneralRe: Who is coneected with My Mechine Pin
nidheeshkayal5-Jan-09 23:51
nidheeshkayal5-Jan-09 23:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.