MD5

5 thoughts on “MD5

  1. How do i calculate the below on my GM862 module (Python). 

      

    result = MD5(‘test’)

    result = 098f6bcd4621d373cade4e832627b4f6

     

     

    would this work ?

     

    m = new()
    m.update(‘test’)
    m.digest() 

     

     

     

    what outcome should i expect ?

  2. import md5
    md5.new("test").digest()
    "11217k315F!323s312336N203&'264366"

     

     

    what’s difference here….

     

    everywhere else i calculate MD5("test"), i get this:

    098f6bcd4621d373cade4e832627b4f6

     

    i suppose the last one is hexadecimal, is the one from telit binary ?

     

    can i convert it somehow ?

     

     

     

    1. import md5

      s = md5.new("test").digest()
      a = ”
      for x in s:
          a = a + hex(ord(x))
      print a

      with the same output on PC and module, same as yours:

       

       0x90x8f0x6b0xcd0x460x210xd30x730xca0xde0x4e0x830x260x270xb40xf6