Author Topic: sha1  (Read 1999 times)

Oh my god, I just was looking through the Teledoor script to make my Security Camera script
and this is what i saw
Code: [Select]
getSubStr(sha1(%obj.getTransform()), 0, 5);Am i late or what :o

I don't understand what you need help with. Could you rephrase the question?

It probably just adjusts the numbers a little to be more normal, probably insignificant.

Sha1 is a cryptographic hash. In this case, it is using the first 5 characters of a hash of the position vector, probably as a unique identifier of something.

I suspect that it is implemented in the engine and is already used in the updater, so re-using it was the most convenient option, requiring no additional code for an acceptable result.

No no, there's no other variables besides the transform in the command. The 0 and 5 are for getSubStr.

The 0 and 5 are for getSubStr.
using the first 5 characters of a hash of the position vector
I don't understand why you corrected him.

I think this would make more sense if you actually told us more speciffically what the question is, because right now it just looks like your saying that this function exists and that you're surprised.

You're saying that this function exists and that you're surprised.
Indeed I am.
Did anyone else know about this? I feel late  :C

Indeed I am.
Did anyone else know about this? I feel late  :C
I knew about it, yes. But only when v19 came out.

lol I had exactly the same reaction when I learned about call()


... like last week...

lol I had exactly the same reaction when I learned about call()


... like last week...
I had the same reaction when I learned about save() some time ago.

lol I had exactly the same reaction when I learned about call()
Haha, I heard about that like a month ago and realized "stuff, I really could have used that back when I built that AI."

I wonder if there are any other "cryptographic" functions built into blockland.

I wonder if there are any other "cryptographic" functions built into blockland.

dumpConsoleFunctions(); (dumpConsoleClasses(); for engine-coded stuff? Don't remember.)

Found new dump functions. dumpCacheFiles(); seems to be busted, though. It freezes up the game while it goes through every file in the cache, listing errors for each as if they were attempted to be written in an incorrect fashion.
« Last Edit: November 30, 2011, 11:00:38 PM by MegaScientifical »

dumpConsoleFunctions(); (dumpConsoleClasses(); for engine-coded stuff? Don't remember.)

Found new dump functions. dumpCacheFiles(); seems to be busted, though. It freezes up the game and lists errors for every file in the cache as if it's trying to write them and in an incorrect fashion.

Care to share the dump functions?

Care to share the dump functions?
Open console
Type 'dump'
Press tab repeatedly

Open console
Type 'dump'
Press tab repeatedly
I think he means like a really overly-long and boring functions list like the 393 page TGE manual.

offtopic: New Avatar! (for you)