How to implement sha1 truncated database keys?

I am working on a multi-user application that will implement service APIs. I don’t want to disclose the default auto-increment key for security reasons and data transfer / replication issues, so I'm looking for alternative keys. The GUID / UUID is an obvious choice, but they make the URL a little longer, and as I read an article about them, I saw that Google uses “truncated SHA1” for its URL identifiers.

How it works? It is my understanding that you haveh part / all of the contents of an object to come up with a key. My objects can change over time, so hashing the whole object will not work, because over time the key will remain unchanged. Can I implement UUID and hash? What are the limitations / problems when using SHA1 for keys (e.g. maximum records, collision, etc.)?

I searched Google but did not find a suitable search term.

/ * edit: additional environmental information * /
We are currently a Java store using Spring / Hibernate with MySQL in reverse order. We are in the process of switching the core development to Grails, where this idea will be implemented.

+3
source share
2 answers

Blowfish URL. , URL-, , , SHA256, .

+3

, ( , ). , , , . GUID - -, . "" , , , .

, SHA1 160 1.46 × 10 ^ 48, , . , - , - SHA256 SHA512, , - .

- , , , , , , .

+1

All Articles