RS散列方案方案、RS

2023-09-11 06:01:23 作者:最牛

谁能告诉我的工作原理或算法的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/ )。

 
精彩推荐
图片推荐