Menu

Password hashing

Anonymous
2018-02-16
2018-03-08
  • Anonymous

    Anonymous - 2018-02-16

    Hi everyone

    Are there any libraries or functions that enable secure password hashing in Unicon (e.g. Bcrypt)?

    I know of libsodium - a popular cryptographic library written in C with many languguage bindings. Unfortunately, there are no bindings for Unicon.

    Are there any tutorials on creating language bindings to C functions?

    Any advice or suggestions appeciated :-)

    Thanks
    Josh

     
    • Jafar

      Jafar - 2018-02-17

      I was thinking the same thing just earlier today! Unicon has the function crypt(key, salt) which can be used for this. Whether this fucntion is available or not depends on the OS you are using. This fucntion is premitive.

      I have been thinking of expanding our use of openssl and provie more crypto functions. Don Ward has been working on implementing a few functions using the C interface.

      We have been trying to fromlize the C language interface, but it is still WIP. You can look at some examples under unicon/plugins.

      Regards,
      Jafar

       
      • Anonymous

        Anonymous - 2018-02-17

        Many thanks Jafar - I will take a look at the examples under unicon/plugins.

        Unicon seems ideal for web programming given its strength in text processing and having functions that allow secure sign-in would be a great addition to the language.

         
  • Brian Tiffin

    Brian Tiffin - 2018-02-23

    Anon, regarding interfacing to C; although it isn't written as a tutorial, the Sample programs chapter of the Unicon Programming book has quite a few examples of bindings to C library functions.

    These mostly use the loadfunc builtin and small wrappers written in C for data marshalling.

    http://btiffin.users.sourceforge.net/up/programs.html#sample-programs

    The Multilanguage chapter explores an alternative using libffi, allowing foreign function interfacing using direct calls to C functions, pairing stack arguments with enumerated types, no need for any C helpers, only Unicon source code.

    Currently coined as uniffi, unify.
    http://btiffin.users.sourceforge.net/up/multilanguage.html#uniffi

    The entry before that one explores a small layer of assembly code to do the same thing, but libffi is already very well supported on many platforms.

    Have good, make well,
    Brian

     
    • Anonymous

      Anonymous - 2018-03-08

      Many thanks for the examples Brian - I will take a look

      Best
      Josh

       

Anonymous
Anonymous

Add attachments
Cancel