Standared.UUID: Fixed some warnings.

parent 9d748258
...@@ -350,7 +350,7 @@ UUID make_version3(string name, string|UUID namespace) { ...@@ -350,7 +350,7 @@ UUID make_version3(string name, string|UUID namespace) {
#endif #endif
// step 3 // step 3
string ret = Crypto.MD5.hash(namespace+name); string ret = Crypto.MD5.hash(([string(8bit)]namespace)+name);
#if 0 #if 0
ret = reverse(ret[0..3]) + reverse(ret[4..5]) + ret = reverse(ret[0..3]) + reverse(ret[4..5]) +
...@@ -396,7 +396,7 @@ UUID make_version5(string name, string|UUID namespace) { ...@@ -396,7 +396,7 @@ UUID make_version5(string name, string|UUID namespace) {
namespace = UUID(namespace); namespace = UUID(namespace);
namespace = namespace->encode(); namespace = namespace->encode();
string ret = Crypto.SHA1.hash(namespace+name)[..15]; string ret = Crypto.SHA1.hash(([string(8bit)]namespace)+name)[..15];
ret &= ret &=
"\xff\xff\xff\xff" // time_low "\xff\xff\xff\xff" // time_low
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment