April 18, 2024, 11:34:59 pm

Author Topic: [Module] Improved Hashing  (Read 1442 times)

0 Members and 1 Guest are viewing this topic.

stormeus

  • Vice Underdog
  • Crazy Man
  • *
  • *
  • Posts: 1755
  • Country: us
  • VC:MP Developer
    • View Profile
    • GTA VICE CITY Respective owner
[Module] Improved Hashing
« on: July 23, 2013, 01:38:20 am »
This is a release I had on the LU forum that I just never got around to posting here.



Stormeus' Improved Hashing ( lu_hashing2 )

This module is an improvement and a variant of Liberty Unleashed's lu_hashing module, which ships with the server. This version offers a wider variety of hashing functions which are more secure, while still offering backward-compatibility by allowing the use of the SHA1 and (insecure!!) MD5 algorithms.

Functions
Acceptable for password hashing and storage
  • SHA224( szString )
  • SHA256( szString )
  • SHA384( szString )
  • SHA512( szString )
  • RIPEMD128( szString )
  • RIPEMD160( szString )
  • RIPEMD256( szString )
  • RIPEMD320( szString )
  • WHIRLPOOL( szString )
NOT acceptable for password hashing and storage.
  • SHA1( szString )

    Algorithmically weak and contains weaknesses that make it relatively easy to crack. This function is only provided for backwards-compatibility. If you are creating a new script, DO NOT USE THIS.

  • MD5( szString )

    MD5 has flaws in its algorithm that allows it to be broken relatively easily. This function is only provided for backwards-compatibility. If you are creating a new script, DO NOT USE THIS.

  • base64_encode( szString )
    base64_decode( szString )


    base64 is easily encoded and decoded. Storing passwords with base64 is not recommended ever because it is extremely easy to reverse.

Installation
Extract lu_hashing2.dll/so to your Modules folder. Place this line of code somewhere in onScriptLoad:
     LoadModule( "lu_hashing2" );

Download
Windows binary [.dll]
Linux binary [.so]
Source code

Test script [.nut]

Screenshot
« Last Edit: July 23, 2013, 03:13:22 am by stormeus »
Informative Informative x 2 Useful Useful x 2 (list)
Agree Disagree Funny Winner Pwnt Informative Friendly Useful Optimistic Artistic Late Brain Donor

<krystianoo> stormeus do good job
<krystianoo> with recent update
<krystianoo> if not agree; jeb yourself in head
<Avenger> yesterday you said death to stormeus
<karan> double standard krystianoo
<karan> he called him fake prophet too
<krystianoo> sure fake prophet
<krystianoo> but with recent updates real

OathBreaker

  • Fanatic
  • ****
  • Posts: 124
  • Country: pk
  • Breaking Oaths is just what I do :P
    • View Profile
Re: [Module] Improved Hashing
« Reply #1 on: July 24, 2013, 11:55:29 am »
admins just check once if stormeus posted a thing like this before because the same thing happened at the oher squirrel forum at vcmp.liberty-unleashed.co.uk
Brain Donor Brain Donor x 12 (list)
Agree Disagree Funny Winner Pwnt Informative Friendly Useful Optimistic Artistic Late Brain Donor

Quote from: Byakuya Kuchiki
Arrogance destroys the footholds of victory

stormeus

  • Vice Underdog
  • Crazy Man
  • *
  • *
  • Posts: 1755
  • Country: us
  • VC:MP Developer
    • View Profile
    • GTA VICE CITY Respective owner
Re: [Module] Improved Hashing
« Reply #2 on: July 24, 2013, 08:24:53 pm »
admins just check once if stormeus posted a thing like this before because the same thing happened at the oher squirrel forum at vcmp.liberty-unleashed.co.uk

The irony here is delicious.
Pwnt Pwnt x 1 (list)
Agree Disagree Funny Winner Pwnt Informative Friendly Useful Optimistic Artistic Late Brain Donor

<krystianoo> stormeus do good job
<krystianoo> with recent update
<krystianoo> if not agree; jeb yourself in head
<Avenger> yesterday you said death to stormeus
<karan> double standard krystianoo
<karan> he called him fake prophet too
<krystianoo> sure fake prophet
<krystianoo> but with recent updates real