Use sprintf() to prefix zeros on the returned node hex string

This commit is contained in:
Ben Ramsey
2017-09-22 13:03:41 -05:00
parent 1ec0826a40
commit 5c38d41ccb
2 changed files with 20 additions and 1 deletions
+1 -1
View File
@@ -36,6 +36,6 @@ class RandomNodeProvider implements NodeProviderInterface
// Set the multicast bit; see RFC 4122, section 4.5.
$node = $node | 0x010000000000;
return dechex($node);
return sprintf('%012x', $node);
}
}