Shorter GUID using CRC

I am building a site in ASP.NET and want to have a user profile that can be accessed through the URL with the user id at the end. A unique identifier is obviously a bad choice as it is long and (correct me if I am wrong) not very URL friendly.

I was interested to find out if I created a unique identifier on the ASP page and then hashed it using CRC (or something similar) if it is still unique (or even unique) as soon as the GUID.

For example:

GUID 6f1a7841-190b-4c7a-9f23-98709b6f8848 is equal to CRC E6DC2D44.

thanks

+3
source share
9 answers

CRC GUID , . - , 4 .

, GUID, , CRC.

, . , URL- , ( ), . , . .

+11

(), , . .

+3

, ? ( !) , , URL. ASP.NET( " " ). - , () ?

+2

, , . 32 8 , 75% .

, . 16 ( 16), (, 64), .

+1

GUID URL- HTTP. , Guid .

var gid = Guid.NewGuid().ToString("N");

GUID .

+1

GUID , , , , -. , . - , CRC, , (, , , ), .

URL-.

+1

CRC UUID/GUID ID, .

UUID/GUID - , .

, URL- ?

URL- UUID/GUID - , http.

0

( , )?

GUID, , , ID ( ); .

If they are identified by a unique integer value, why not use this to invoke a user profile?

0
source

You can reduce the GUID to 20 printable ASCII characters, and it is still unique and will not lose any information.

Take a look at this Jeff Atwood blog post:
Equipping our ASCII Armor

0
source

Source: https://habr.com/ru/post/1713575/


All Articles