RS散列方案 [英] RS hashing program

查看:158
本文介绍了RS散列方案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

谁能告诉我的工作原理或算法的RS串散列算法?我需要它,但无法找到谷歌。请帮我与算法ATLEAST,我会实现它在我自己的。

Can anyone please tell me the working principle or algorithm for the RS string hashing algorithm? I need it, but cannot find on google. Please help me with the algorithm atleast, i would implement it on my own.

推荐答案

你的意思罗伯特·塞奇威克的字符串散列算法?

Do you mean Robert Sedgewick's string hashing algorithm?

uint a = 63689, uint b = 378551
foreach ( byte x ; bytes ) {
    value = value * a + x;
    a *= b;
}
return value;

(从引述 http://pallas.telperion.info/d/hash/ )。

这篇关于RS散列方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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