User Profile

Collapse

Profile Sidebar

Collapse
hamedpersian
hamedpersian
Last Activity: Feb 21 '12, 07:40 PM
Joined: Feb 20 '12
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • hamedpersian
    started a topic Hash function in python

    Hash function in python

    I have written some hash code and it supposed to have a 32 bits output. But i don't know how to make it 32 bit as the output. please help me with this. Here is my code:
    Code:
    import BitVector
    import io
    import math
    import struct
    
    if __name__ == "__main__":
        message = raw_input("your message:")
        f= open('file.dat','w')
        f.write(message)
        f.close()
    ...
    See more | Go to post

  • hamedpersian
    replied to Hash function in python
    In the first part that i wrote there is some error. It get the input from the user and convert it to binary. It works but at the end it gives me an error regarding the value for the base 16. I copying my code here, please tell me where the error is coming from.
    thanks.

    ----------------------------------
    Code:
    import BitVector
    import io
    
    if __name__ == "__main__":
        message = raw_input("your
    ...
    See more | Go to post
    Last edited by Rabbit; Feb 21 '12, 04:33 AM. Reason: Please use code tags when posting code.

    Leave a comment:


  • hamedpersian
    started a topic Hash function in python

    Hash function in python

    Hi guys. I'm new to cryptography. I'm practicing different hash algorithm. IS there any one who can tell me how to write a simple hash function that creates a 32-bit hash of a file?
    Thanks.
    See more | Go to post
No activity results to display
Show More
Working...