Firebird:如何制作md5哈希? [英] Firebird: How to make an md5 hash?
问题描述
我想更新数据库中的所有密码,使其具有MD5哈希密码.以下内容无法解决我的问题:
I want to update all passwords in the DB to have a MD5 hashes password. The following doesn't solve my problem:
UPDATE USERS SET USERPASS = hash('SALT' || USERPASS);
问题存在:它返回的哈希值不是使用MD5算法生成的.如何在Firebird中实现md5哈希算法?
Problem being: it returns a hash that was not generated using the MD5 algorithm. How can I impliment the md5 hash algorithm in Firebird?
推荐答案
不幸的是,
Unfortunately the algortihm of the hash
function is not mentioned in the documentation... anyway, you can implement it as an UDF or use some thirdparty UDF lib which implements it. There is a list of UDF Libraries for Firebird on the IBPhoenix website and it seems that both rFunc and FreeAdhocUDF library have one (I only checked these two, there is probably others).
这篇关于Firebird:如何制作md5哈希?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!