Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: Integrate external application with anope database  (Read 201 times)

0 Members and 1 Guest are viewing this topic.

Kaj

  • Anope User
  • Offline Offline
  • Posts: 11
Integrate external application with anope database
« on: August 17, 2020, 11:54:50 AM »

Hi all,

In the past I've created an application where users were able to log in using their registered nickname (registered with NickServ). This was done by reading the anope database, and is dependent on using the md5 hashing algorithm to compare if the provided password was correct.

As md5 is (very) outdated, I'd like to update this application to support the enc_sha256. However, to be able to hash the password that a user provides in the external application and compare it with the record in the anope database, I suppose that I would need to use the same salt as anope is using. How/where would I be able to find this?

Or is there another recommended approach to integrate an external application with Anope?

Kind regards,

Kaj
Logged

CrazyCat

  • Anope User
  • Offline Offline
  • Posts: 203
    • French Eggdrop community
Re: Integrate external application with anope database
« Reply #1 on: August 17, 2020, 01:30:45 PM »

Well, I use md5 in anope, but I think it's the same with sha256 : no salt.
In NickCore, the pass contains (for me): CONCAT('md5:', MD5('password')).

Kaj

  • Anope User
  • Offline Offline
  • Posts: 11
Re: Integrate external application with anope database
« Reply #2 on: August 17, 2020, 02:49:36 PM »

Hey, thanks for the reply. Until this moment I did it as well with md5, that's indeed without any kind of salt - but I'm trying to do it with sha256 and when I hash the password using sha256 without a salt, I end up with a totally different hash than the one in the anope database. So I suppose that there is a salt used for that one.
Logged
Pages: [1]   Go Up