169 похожих чатов

Hi, what is unsalted hash in postgres. ?

1 ответов

4 просмотра

well a SALTED hash, for MD5() for example is when you ADD Strings/text to the value, to ensure dictionary attacks on weak passwords don't work, and no 2 user passwords (even if the same) result in the same hash value. MD5 is weak, use SHA-256... But using MD5() here: Unsalted = SELECT MD5($1); — where $1 is user's password Salted = SELECT MD5( concat('Some RaNdOm SaLt 123', $2,'+', $1,'... Ending Salt'); — Where $2 is user_ID, $1 is pwd you should be able to realize how much BETTER some salting is. It means the attacker would either need to your salting/string setup... Or their brute force attacks on your passwords is futile. FWIW, salting can be complex, and done 1/2 in the client as above, and 1/2 in a DB server plpgsql function. So that NEITHER developer has access to the proper salting technique! Salted = SELECT MD5( concat('Some RaNdOm SaLt 123', $2,'+', DB_PWD_SALT($1),'... Ending Salt'); — Where $2 is user_ID, $1 is pwd Some call it overkill... I call it sleeping WELL At night. Never include "Email" with the salt, if the user can change their email address... (then it breaks their salted password in my second example). One must think ahead. (I used "ID" specifically, which should NEVER change, but PK would have been a better descriptor). HTH...

Похожие вопросы

Обсуждают сегодня

type TObj = object procedure Init; virtual; end; TObj1 = object(TObj) procedure Init; override; end; procedure TObj1.Init; begin inherited; end; procedur...
Alexander 👋
29
Есть какой-нибудь для Delphi/FPC T*Compression(Decompression)Stream на базе LZ4/Zstd/любой другой быстрый(и хорошо сжимающий) алгоритм А ещё лучше в pure pascal А ещё лучше од...
notme
45
А чем вам питонисты не угодили?😂
.
79
Можно ли загрузить скрипт py в бота чтобы он работал по нему? как это сделать?
huskadam #RCC Фанат? @hitlerpvp
13
А дин типизация это хорошо или плохо?
Alexey
12
Исходники плюс документация? Вы гоните)) демок хватит всем
zamtmn
11
Язык Си можно выучить за день? По книжке ANSI C на 230 страниц
Vincent Vegan
29
Hello. Could you please help me with finding all coordinates within a radius using a spatial index, given that I have a table with coordinates? SET @lng = 37.57925; SET @lat ...
Rinchin G
7
Всем привет, написал код ниже, но он выдает сегфолт, в чем причина? #include <stdio.h> #include <stdlib.h> #include <string.h> struct product { char *name; float price; };...
buzz базз
76
а что есть "статистика" ? просто подсчет фактов обращения и времен выполнения ?
Сергей
9
Карта сайта