pgcrypto

    1熱度

    2回答

    我正在爲express.js和postgresql db中的網站安全編碼。現在我一直在閱讀關於salting和hashing的內容,並且我已經使用crypto模塊使用pdkdf2設置了代碼,但是我的問題是我將如何在db中構建帳戶表。如果我將創建一個登錄角色,該角色將具有密碼的MD5加密格式,該密碼將是來自salt n hash「過程」的派生密鑰。這會不會是一種保護措施? 將會有一個表格如下:UID

    1熱度

    1回答

    例如,在Django中有這樣做的回購:https://sourcegraph.com/github.com/dcwatson/django-pgcrypto。 有一個在SQLAlchemy的手冊一些討論,但我使用非字節列:http://docs.sqlalchemy.org/en/rel_0_9/core/types.html 我使用的SQLAlchemy在Heroku上運行的燒瓶中。 一個代碼示

    0熱度

    1回答

    這個代碼不工作: select * from persons where lower(email) = lower({email}) and (password = crypt('{password}', password)) and approved = 1 and now() between start_date and coales