Firebird:如何制作md5哈希? [英] Firebird: How to make an md5 hash?

查看:77
本文介绍了Firebird:如何制作md5哈希?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想更新数据库中的所有密码,使其具有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?

推荐答案

不幸的是,hash函数的算法/reference_material/html/langrefupd25-intfunc-hash.html"rel =" noreferrer>文档 ...无论如何,您都可以将其实现为UDF或使用一些第三方UDF库来实现.在IBPhoenix网站上有一个 UDF for Firebird库的列表,看来这两个rFunc和FreeAdhocUDF库只有一个(我只检查了这两个,可能还有其他).

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆