java - Is a generated UUID from a String reversible? -



java - Is a generated UUID from a String reversible? -

if generate uuid "seed" string follows, there way re-generate original string?

uuid uuid = null; seek { uuid = uuid.nameuuidfrombytes(("seedstring").getbytes("utf8")); } grab (unsupportedencodingexception e) { e.printstacktrace(); } system.out.println("uuid: " + uuid.tostring());

i assume isn't possible, believe person found here: convert uuid bytes

however, see same uuid generated every time string/bytes, , since has unique, simple "seed" values guessed? example, uuid of f 8fa14cdd-754f-31cc-a554-c9e71929cce7 if see know generated "f".

since getting uuid casting bytes uuid, , using same starting bytes cast from, uuid same uuid across multiple runs.

i think you've confused random seed "from bytes" method in uuid routines. more cast seed initialization. , if seed initialization, initializing constant seed mean walk "same" pseudo-random path (meaning after walking once, can know next step(s)).

aug makes first-class point, i'll elaborate bit on here. uuid identifier, assumed unique virtue of there beingness many take from; however, if create routine returns same one(s) repeatedly, it's not going unique due selection mechanism. actual mechanism doesn't assure uniqueness; less when using routine guaranteed homecoming identical values.

as not guaranteed unique (uuids have fixed number of bits , combinations can exhausted), 1 can imagine there more inputs uuids (although there's lot of uuids) uuid collision inevitable (even if theoretically take more time heat death of universe). practical side of things, have little worry about; but, still (minuscule chance) happen.

this means 1 can (in theory) guarantee 2 inputs out there can wind same uuid, , result, uuids not reversible (however, in specific (limited) cases, perhaps made reversible).

java security uuid

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -