English 中文(简体)
在java有内在的洗衣?
原标题:is there a built-in hash implementation in java?
  • 时间:2011-11-16 02:10:46
  •  标签:
  • java
  • hash

I have an array of 6 ints that I am interested in getting a hash value for (an int). I am wondering if there is a relatively strong and fast hash function for this case which is implemented in Java.

我几乎想把这6个插头改为“强硬”(如每条单条编码性质,或像这样,不代表每个星号作为实际数字)和使用“印花编码”,但对于我来说,它非常低效,我认为需要更快一些。 任何想法?

Thanks.

最佳回答
int[] myIntArray = {1, 2, 3, 4, 5};
int myHashCode = Arrays.hashCode(myIntArray);

注:Arrays有hashCode()适用于所有原始类型,而不仅仅是帐篷。

还有一点告诉我,你将再使用6个号码的序列作为通行证编码,并用斜体与之匹配。 在这种情况下,你会再次要求真正、真正长久的洗衣。 至少提前24小时,而不是4位 in子会给你。 (拥有比你投入空间更大的散射空间将减少碰撞。)

d 前往SHA-384或以上。 不要忘记盐类。

问题回答

暂无回答




相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签