Rev 1336 | Rev 1343 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1336 | Rev 1342 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | # OIDplus Information Object GUID format |
1 | # OIDplus UUID format |
2 | 2 | ||
3 | ## OIDplus Information Object GUID |
3 | ## General OIDplus UUID format |
4 | 4 | ||
5 | OIDplus automatically assigns a UUID to every object it manages. It is based on the custom UUID type (UUIDv8) which was defined in the new version of RFC 4122. |
5 | OIDplus generates UUIDs for various object types using UUIDs in the "Custom / Version 8" format as defined in the new version of RFC 4122. |
- | 6 | ||
- | 7 | The general structure of these UUIDs is: |
|
6 | 8 | ||
7 | |Block| Byte | Length | Description | |
9 | |Block| Byte | Length | Description | |
8 | |-----|------|---------|----------------------| |
10 | |-----|-------|---------|----------------------| |
9 | | 1 | 0-3 | 1 bit | Reserved, must be 0. |
11 | | 1 | 0-3 | 1 bit | Reserved, must be 0. |
10 | | | | 31 bits | OIDplus SystemID (lower 31 bits of SHA1 of Public Key) |
12 | | | | 31 bits | OIDplus SystemID (lower 31 bits of the SHA1 hash of the Public Key in raw binary representation) |
11 | | 2 | 4-5 | 16 bits | Creation timestamp: Days since 01.01.1970 00:00 GMT; 0 if unknown. Max possible: 0xFFFF = 06 June 2149 |
13 | | 2 | 4-5 | 16 bits | Creation timestamp: Days since 01.01.1970 00:00 GMT; 0 if unknown or not applicable. Max possible: 0xFFFF = 06 June 2149 |
12 | | 3 | 6-7 | 4 bits | UUID Version, must be 0x8 (Custom UUID) |
14 | | 3 | 6-7 | 4 bits | UUID Version, must be 0x8 (Custom UUID) |
13 | | | | 12 bits | Reserved, must be 0x0000 |
15 | | | | 12 bits | Reserved, must be 0x0000 |
14 | | 4 | 8-9 | 2 bits | UUID Variant, must be 0b10 (RFC 4122) |
16 | | 4 | 8-9 | 2 bits | UUID Variant, must be 0b10 (RFC 4122) |
15 | | | | 14 bits | Namespace (lower 14 bits of SHA1 of Namespace OID) |
17 | | | | 14 bits | Namespace |
16 | | 5 |10-15 | 48 bits | Object name (lower 48 bits of SHA1 of canonical object name) |
18 | | 5 | 10-15 | 48 bits | Data as defined by the namespace |
17 | 19 | ||
18 | ### Example |
- | |
19 | 20 | ||
20 | The object **java:com.example**, created 30 September 2018 on system #1855139287 has the following UUID: |
21 | ## OIDplus System UUID (Block 4 = 0x8000) |
21 | 22 | ||
- | 23 | Every OIDplus system can be identified by a UUID. |
|
- | 24 | ||
- | 25 | The 14-bit namespace has a fixed value of 0, i.e. block 4 has the value of `0x8000`. |
|
- | 26 | ||
- | 27 | The 48-bit data has a fixed value of `0x1890afd80709` which is the lower 48 bits of SHA1 of an empty string. |
|
- | 28 | ||
- | 29 | The creation timestamp is currently 0 because OIDplus does not track the creation time of a freshly installed system. |
|
- | 30 | ||
- | 31 | **Example**: System #1855139287 has the following UUID: |
|
- | 32 | ||
22 | 6e932dd7-458c-8000-b9e9-c1e3894d1105 |
33 | 6e932dd7-0000-8000-8000-1890afd80709 |
23 | 34 | ||
24 | It contains the information as follows: |
35 | It contains the information as follows: |
25 | 36 | ||
26 | |Block| Description | Value | Interpretation | |
37 | |Block| Description | Value | Interpretation | |
27 | |-----|-------------------|----------------|----------------| |
38 | |-----|-------------------|------------------|----------------| |
- | 39 | | 1 | System ID | 0x6E932DD7 | SHA1(PubKey) & 0x7FFF.FFFF = 1855139287 |
|
- | 40 | | 2 | Timestamp | 0x0000 | Unknown |
|
- | 41 | | 3 | Reserved+Version | 0x8000 | 0x0000 \| 0x8000 |
|
- | 42 | | 4 | Namespace+Variant | 0x8000 | 0x0000 \| 0x8000 |
|
- | 43 | | 5 | Data | 0x1890AFD80709 | SHA1('') & 0xFFFF.FFFF.FFFF |
|
- | 44 | ||
- | 45 | ||
- | 46 | ## OIDplus User/RA UUID (Block 4 = 0x8001) |
|
- | 47 | ||
- | 48 | Every user (RA or the Admin) can be identified by a UUID. (Defined hereby, but currently not used in OIDplus) |
|
- | 49 | ||
- | 50 | The 14-bit namespace has a fixed value of 1, i.e. block 4 has the value of `0x8001`. |
|
- | 51 | ||
- | 52 | For the Admin account, the 48-bit data has a fixed value of `0x000000000000`. |
|
- | 53 | The creation timestamp for the admin is the creation of the system, |
|
- | 54 | which is currently 0 because OIDplus does not track the creation time of a freshly installed system. |
|
- | 55 | ||
- | 56 | For an RA account, the 48-bit data are the lower 48 bits of the SHA1 hash of the email address of the RA. |
|
- | 57 | The creation timestamp is the user registration time, which is currently 0 |
|
- | 58 | because OIDplus does not track the creation time of a user registration. |
|
- | 59 | ||
- | 60 | Please note: Since there may be collisions in the 48-bit hash, |
|
- | 61 | this UUID should only be used for security-relevant applications |
|
- | 62 | if the system ensures that there is no collision, e.g. by storing |
|
- | 63 | all UUIDs and rejecting new user accounts if their UUID collides |
|
- | 64 | with another user. |
|
- | 65 | ||
- | 66 | **Example**: The user "joe@example.com" on system #1855139287 has the following UUID: |
|
- | 67 | ||
- | 68 | 6e932dd7-0000-8000-8001-2938f50e857e |
|
- | 69 | ||
- | 70 | It contains the information as follows: |
|
- | 71 | ||
- | 72 | |Block| Description | Value | Interpretation | |
|
- | 73 | |-----|-------------------|----------------|--------------------------------------------| |
|
- | 74 | | 1 | System ID | 0x6E932DD7 | SHA1(PubKey) & 0x7FFF.FFFF = 1855139287 |
|
- | 75 | | 2 | Timestamp | 0x0000 | Unknown |
|
- | 76 | | 3 | Reserved+Version | 0x8000 | 0x0000 \| 0x8000 |
|
- | 77 | | 4 | Namespace+Variant | 0x8001 | 0x0001 \| 0x8000 |
|
- | 78 | | 5 | Data | 0x2938F50E857E | SHA1('joe@example.com') & 0xFFFF.FFFF.FFFF |
|
- | 79 | ||
- | 80 | ||
- | 81 | ## OIDplus Log entry UUID (Block 4 = 0x8002) |
|
- | 82 | ||
- | 83 | Every log entry can be identified by a UUID. (Defined hereby, but currently not used in OIDplus) |
|
- | 84 | ||
- | 85 | The 14-bit namespace has a fixed value of 2, i.e. block 4 has the value of `0x8002`. |
|
- | 86 | ||
- | 87 | The 48-bit data is a sequential number. It can be either sequential and unique |
|
- | 88 | for the current day of the given system, or be sequential and unique for the system |
|
- | 89 | independent of the day. An example of the latter usage would be using the |
|
- | 90 | autoincrement field of the database table. |
|
- | 91 | In case the autoincrement field of the database gets lost (e.g. data loss in the |
|
- | 92 | log table or fresh install of the system), then the sequence could be incremented |
|
- | 93 | by a reasonable value at least for the rest of the current day. |
|
- | 94 | ||
- | 95 | **Example**: The log entry 1234 on system #1855139287 logged on 30 September 2018 has the following UUID: |
|
- | 96 | ||
- | 97 | 6e932dd7-458c-8000-8002-0000000004d2 |
|
- | 98 | ||
- | 99 | It contains the information as follows: |
|
- | 100 | ||
- | 101 | |Block| Description | Value | Interpretation | |
|
- | 102 | |-----|-------------------|----------------|----------------------------------------------| |
|
28 | | 1 | System ID | 0x6E932DD7 | SHA1(PubKey) & 0x7FFF.FFFF = 1855139287 |
103 | | 1 | System ID | 0x6E932DD7 | SHA1(PubKey) & 0x7FFF.FFFF = 1855139287 |
29 | | 2 | Timestamp | 0x458C | 30 September 2018 (17804 days since 1 January 1970) |
104 | | 2 | Timestamp | 0x458C | 30 September 2018 (17804 days since 1 January 1970) |
30 | | 3 | Reserved+Version | 0x8000 | 0x0000 \| 0x8000 |
105 | | 3 | Reserved+Version | 0x8000 | 0x0000 \| 0x8000 |
31 | | 4 | Namespace+Variant | 0xB9E9 | SHA1('1.3.6.1.4.1.37476.2.5.2.4.8.6') & 0x3FFF \| 0x8000 |
106 | | 4 | Namespace+Variant | 0x8002 | 0x0002 \| 0x8000 |
32 | | 5 | Object Name | 0xC1E3894D1105 | SHA1('com.example') & 0xFFFF.FFFF.FFFF |
107 | | 5 | Data | 0x0000000004D2 | Sequence 1234 |
33 | 108 | ||
34 | 109 | ||
35 | ## OIDplus System GUID |
110 | ## OIDplus Configuration entry UUID (Block 4 = 0x8003) |
36 | 111 | ||
37 | Every OIDplus system can be identified by a UUID generated using this schema based on the Information Object UUID. |
112 | Every system configuration entry (the values on the config database table; |
- | 113 | not the base configuration settings in the userdata folder) can be |
|
- | 114 | identified by a UUID. (Defined hereby, but currently not used in OIDplus) |
|
38 | 115 | ||
39 | |Block| Byte | Length | Description | |
- | |
40 | |-----|------|---------|----------------------| |
- | |
41 | | 1 | 0-3 | 1 bit | Reserved, must be 0. |
- | |
42 | | | | 31 bits | OIDplus SystemID (lower 31 bits of SHA1 of Public Key) |
116 | The 14-bit namespace has a fixed value of 3, i.e. block 4 has the value of `0x8003`. |
43 | | 2 | 4-5 | 16 bits | Reserved for system creation timestamp. Currently 0 because OIDplus does not track the timestamp of a new system. |
- | |
44 | | 3 | 6-7 | 4 bits | UUID Version, must be 0x8 (Custom UUID) |
- | |
45 | | | | 12 bits | Reserved, must be 0x0000 |
- | |
46 | | 4 | 8-9 | 2 bits | UUID Variant, must be 0b10 (RFC 4122) |
- | |
47 | | | | 14 bits | Namespace: Fix value of 0. |
- | |
48 | | 5 |10-15 | 48 bits | Object name: Fix 0x1890afd80709 (lower 48 bits of SHA1 of an empty string) |
- | |
49 | 117 | ||
- | 118 | The 48-bit data are the 48 bits of the SHA1 hash of the |
|
50 | ### Example |
119 | configuration name. |
51 | 120 | ||
52 | The system #1855139287 has the following UUID: |
121 | The creation timestamp is currently 0 because OIDplus does not track the creation time of configuration entries. |
53 | 122 | ||
- | 123 | **Example**: The configuration value "max_ra_invite_time" on system #1855139287 has the following UUID: |
|
- | 124 | ||
54 | 6e932dd7-0000-8000-8000-1890afd80709 |
125 | 6e932dd7-0000-8000-8003-f14dda42862a |
55 | 126 | ||
56 | It contains the information as follows: |
127 | It contains the information as follows: |
57 | 128 | ||
58 | |Block| Description | Value | Interpretation | |
129 | |Block| Description | Value | Interpretation | |
59 | |-----|-------------------|----------------|----------------| |
130 | |-----|-------------------|----------------|--------------------------------------------| |
60 | | 1 | System ID | 0x6E932DD7 | SHA1(PubKey) & 0x7FFF.FFFF = 1855139287 |
131 | | 1 | System ID | 0x6E932DD7 | SHA1(PubKey) & 0x7FFF.FFFF = 1855139287 |
61 | | 2 | Timestamp | 0x0000 | Unknown |
132 | | 2 | Timestamp | 0x0000 | Unknown |
62 | | 3 | Reserved+Version | 0x8000 | 0x0000 \| 0x8000 |
133 | | 3 | Reserved+Version | 0x8000 | 0x0000 \| 0x8000 |
- | 134 | | 4 | Namespace+Variant | 0x8003 | 0x0003 \| 0x8000 |
|
- | 135 | | 5 | Data | 0xF14DDA42862A | SHA1('max_ra_invite_time') & 0xFFFF.FFFF.FFFF |
|
- | 136 | ||
- | 137 | ||
- | 138 | ## OIDplus ASN.1 Alphanumeric ID UUID (Block 4 = 0x8004) |
|
- | 139 | ||
- | 140 | Each allocation of an alphanumeric (ASN.1) identifier of an OID |
|
- | 141 | can be identified by a UUID. (Defined hereby, but currently not used in OIDplus) |
|
- | 142 | ||
- | 143 | The 14-bit namespace has a fixed value of 4, i.e. block 4 has the value of `0x8004`. |
|
- | 144 | ||
- | 145 | The 48-bit data is defined as follows: |
|
- | 146 | - The upper 24 bits are the lower 24 bits of the SHA1 hash of the OID. |
|
- | 147 | - The lower 24 bits are the lower 24 bits of the SHA1 hash of the alphanumeric ASN.1 identifier. |
|
- | 148 | ||
- | 149 | **Example**: The alphanumeric identifier "example" of OID "2.999" on system #1855139287 has the following UUID: |
|
- | 150 | ||
- | 151 | 6e932dd7-0000-8000-8004-208ded8a3f8f |
|
- | 152 | ||
- | 153 | It contains the information as follows: |
|
- | 154 | ||
- | 155 | | Block | Description | Value | Interpretation | |
|
- | 156 | |-------|-------------------|------------|-----------------------------------------| |
|
- | 157 | | 1 | System ID | 0x6E932DD7 | SHA1(PubKey) & 0x7FFF.FFFF = 1855139287 |
|
- | 158 | | 2 | Timestamp | 0x0000 | Unknown |
|
- | 159 | | 3 | Reserved+Version | 0x8000 | 0x0000 \| 0x8000 |
|
- | 160 | | 4 | Namespace+Variant | 0x8004 | 0x0004 \| 0x8000 |
|
- | 161 | | 5 | Data (High) | 0x208DED | SHA1('2.999') & 0xFF.FFFF |
|
- | 162 | | | Data (Low) | 0x8A3F8F | SHA1('example') & 0xFF.FFFF |
|
- | 163 | ||
- | 164 | ||
- | 165 | ## OIDplus OID-IRI Unicode Label UUID (Block 4 = 0x8005) |
|
- | 166 | ||
- | 167 | Each allocation of a Unicode Label (for OID-IRI) of an OID |
|
- | 168 | can be identified by a UUID. (Defined hereby, but currently not used in OIDplus) |
|
- | 169 | ||
- | 170 | The 14-bit namespace has a fixed value of 5, i.e. block 4 has the value of `0x8005`. |
|
- | 171 | ||
- | 172 | The 48-bit data is defined as follows: |
|
- | 173 | - The upper 24 bits are the lower 24 bits of the SHA1 hash of the OID. |
|
- | 174 | - The lower 24 bits are the lower 24 bits of the SHA1 hash of the Unicode Label in UTF-8 encoding. |
|
- | 175 | ||
- | 176 | **Example**: The Unicode Label "Example" of OID "2.999" on system #1855139287 has the following UUID: |
|
- | 177 | ||
- | 178 | 6e932dd7-0000-8000-8005-208dedaf9a96 |
|
- | 179 | ||
- | 180 | It contains the information as follows: |
|
- | 181 | ||
- | 182 | | Block | Description | Value | Interpretation | |
|
- | 183 | |-------|-------------------|------------|-------------------------------------------------| |
|
- | 184 | | 1 | System ID | 0x6E932DD7 | SHA1(PubKey) & 0x7FFF.FFFF = 1855139287 |
|
- | 185 | | 2 | Timestamp | 0x0000 | Unknown |
|
- | 186 | | 3 | Reserved+Version | 0x8000 | 0x0000 \| 0x8000 |
|
- | 187 | | 4 | Namespace+Variant | 0x8005 | 0x0005 \| 0x8000 |
|
- | 188 | | 5 | Data (High) | 0x208DED | SHA1('2.999') & 0xFFFF.FFFF.FFFF |
|
- | 189 | | | Data (Low) | 0xAF9A96 | SHA1(utf8_encode('Example')) & 0xFFFF.FFFF.FFFF |
|
- | 190 | ||
- | 191 | ||
- | 192 | ## System reserved UUIDs (Block 4 = 0x8006 till 0x800F) |
|
- | 193 | ||
- | 194 | The 14-bit namespace values 6 (block 4 = `0x8006`) through 15 (block 4 = `0x800F`) are reserved |
|
- | 195 | for future use. |
|
- | 196 | ||
- | 197 | ||
- | 198 | ## OIDplus Information Object UUID (Block 4 = 0x8010 till 0xFFFF) |
|
- | 199 | ||
- | 200 | OIDplus automatically assigns a UUID to every object it manages. |
|
- | 201 | ||
- | 202 | The 14-bit namespace is defined as the lower 14 bits of the SHA1 hash of the OIDplus Object Type Plugin OID. |
|
- | 203 | However, the values `0x0` - `0xF` are reserved for the other UUID types and must not be used. (In this case, |
|
- | 204 | the object type plugin author shall pick a different OID for their plugin). So block 4 has a range |
|
- | 205 | between `0x8010` till `0xFFFF`. |
|
- | 206 | ||
- | 207 | The 48-bit data is defined as the lower 48 bits of the SHA1 hash of the |
|
- | 208 | object name without the object type prefix. |
|
- | 209 | ||
- | 210 | **Example**: The object **java:com.example**, created on 30 September 2018 on system #1855139287 has the following UUID: |
|
- | 211 | ||
- | 212 | 6e932dd7-458c-8000-b9e9-c1e3894d1105 |
|
- | 213 | ||
- | 214 | It contains the information as follows: |
|
- | 215 | ||
- | 216 | |Block| Description | Value | Interpretation | |
|
- | 217 | |-----|-------------------|----------------|----------------| |
|
- | 218 | | 1 | System ID | 0x6E932DD7 | SHA1(PubKey) & 0x7FFF.FFFF = 1855139287 |
|
- | 219 | | 2 | Timestamp | 0x458C | 30 September 2018 (17804 days since 1 January 1970) |
|
63 | | 4 | Namespace+Variant | 0x8000 | 0x0000 \| 0x8000 |
220 | | 3 | Reserved+Version | 0x8000 | 0x0000 \| 0x8000 |
- | 221 | | 4 | Namespace+Variant | 0xB9E9 | SHA1('1.3.6.1.4.1.37476.2.5.2.4.8.6') & 0x3FFF \| 0x8000 |
|
64 | | 5 | Object Name | 0xC1E3894D1105 | SHA1('') & 0xFFFF.FFFF.FFFF |
222 | | 5 | Data | 0xC1E3894D1105 | SHA1('com.example') & 0xFFFF.FFFF.FFFF |
65 | 223 | ||
66 | 224 | ||
67 | ## Known namespaces |
225 | ## Known namespaces |
68 | 226 | ||
69 | | Vendor |Namespace| OID | SHA1 hash | Block 4| Notes | |
227 | | Vendor | Namespace | Plugin OID | SHA1 hash | Block 4 | Notes | |
70 | |--------------|---------|--------------------------------|-----------|--------|--------------| |
228 | |--------------|-----------|---------------------------------------------------|-----------|---------|--------------| |
71 | | n/a | n/a | n/a | n/a | 0x8000 | System |
229 | | n/a | n/a | n/a | n/a | 0x8000 | System |
- | 230 | | n/a | n/a | n/a | n/a | 0x8001 | User/RA |
|
- | 231 | | n/a | n/a | n/a | n/a | 0x8002 | Logging entry |
|
- | 232 | | n/a | n/a | n/a | n/a | 0x8003 | Configuration entry |
|
- | 233 | | n/a | n/a | n/a | n/a | 0x8004 | ASN.1 ID |
|
- | 234 | | n/a | n/a | n/a | n/a | 0x8005 | Unicode Label (IRI) |
|
- | 235 | | n/a | n/a | n/a | n/a | 0x8006 | Reserved for system |
|
- | 236 | | n/a | n/a | n/a | n/a | 0x8007 | Reserved for system |
|
- | 237 | | n/a | n/a | n/a | n/a | 0x8008 | Reserved for system |
|
- | 238 | | n/a | n/a | n/a | n/a | 0x8009 | Reserved for system |
|
- | 239 | | n/a | n/a | n/a | n/a | 0x800A | Reserved for system |
|
- | 240 | | n/a | n/a | n/a | n/a | 0x800B | Reserved for system |
|
- | 241 | | n/a | n/a | n/a | n/a | 0x800C | Reserved for system |
|
- | 242 | | n/a | n/a | n/a | n/a | 0x800D | Reserved for system |
|
- | 243 | | n/a | n/a | n/a | n/a | 0x800E | Reserved for system |
|
- | 244 | | n/a | n/a | n/a | n/a | 0x800F | Reserved for system |
|
72 | | ViaThinkSoft | doi | 1.3.6.1.4.1.37476.2.5.2.4.8.1 | 0x...2259 | 0xA259 | |
245 | | ViaThinkSoft | doi | 1.3.6.1.4.1.37476.2.5.2.4.8.1 | 0x...2259 | 0xA259 | |
73 | | ViaThinkSoft | gs1 | 1.3.6.1.4.1.37476.2.5.2.4.8.2 | 0x...021E | 0x821E | |
246 | | ViaThinkSoft | gs1 | 1.3.6.1.4.1.37476.2.5.2.4.8.2 | 0x...021E | 0x821E | |
74 | | ViaThinkSoft | guid | 1.3.6.1.4.1.37476.2.5.2.4.8.3 | 0x...B924 | 0xB924 | In OIDplus, only the UUID itself will be shown |
247 | | ViaThinkSoft | guid | 1.3.6.1.4.1.37476.2.5.2.4.8.3 | 0x...B924 | 0xB924 | In OIDplus, only the UUID itself will be shown |
75 | | ViaThinkSoft | ipv4 | 1.3.6.1.4.1.37476.2.5.2.4.8.4 | 0x...5AF9 | 0x9AF9 | |
248 | | ViaThinkSoft | ipv4 | 1.3.6.1.4.1.37476.2.5.2.4.8.4 | 0x...5AF9 | 0x9AF9 | |
76 | | ViaThinkSoft | ipv6 | 1.3.6.1.4.1.37476.2.5.2.4.8.5 | 0x...55DB | 0x95DB | |
249 | | ViaThinkSoft | ipv6 | 1.3.6.1.4.1.37476.2.5.2.4.8.5 | 0x...55DB | 0x95DB | |
Line 260... | Line 433... | ||
260 | | ViaThinkSoft | (Unused) | 1.3.6.1.4.1.37476.2.5.2.4.8.183 | 0x...DA04 | 0x9A04 | |
433 | | ViaThinkSoft | (Unused) | 1.3.6.1.4.1.37476.2.5.2.4.8.183 | 0x...DA04 | 0x9A04 | |
261 | | ViaThinkSoft | (Unused) | 1.3.6.1.4.1.37476.2.5.2.4.8.184 | 0x...7B3E | 0xBB3E | |
434 | | ViaThinkSoft | (Unused) | 1.3.6.1.4.1.37476.2.5.2.4.8.184 | 0x...7B3E | 0xBB3E | |
262 | | ViaThinkSoft | (Unused) | 1.3.6.1.4.1.37476.2.5.2.4.8.185 | 0x...4854 | 0x8854 | |
435 | | ViaThinkSoft | (Unused) | 1.3.6.1.4.1.37476.2.5.2.4.8.185 | 0x...4854 | 0x8854 | |
263 | --> |
436 | --> |
264 | 437 | ||
- | 438 | ||
265 | ### Notes for new object type plugins |
439 | ## Notes for new object-type plugins |
266 | 440 | ||
267 | (1) When new object types are developed, the plugin author should check |
441 | (1) When new object types are developed, the plugin author should check |
268 | if their "Block 4" hash based on their plugin OID conflicts with the |
442 | if their "Block 4" hash based on their plugin OID conflicts with the |
269 | "Block 4" hashes of plugins from other vendors, and consider |
443 | "Block 4" hashes of plugins from other vendors, and consider |
270 | using a different plugin OID in that case. |
444 | using a different plugin OID in that case. |
Line 285... | Line 459... | ||
285 | $plugin_oid = '2.999'; // your plugin-oid here |
459 | $plugin_oid = '2.999'; // your plugin-oid here |
286 | 460 | ||
287 | if (!str_starts_with($plugin_oid, '1.3.6.1.4.1.37476.2.5.2.4.8.')) { |
461 | if (!str_starts_with($plugin_oid, '1.3.6.1.4.1.37476.2.5.2.4.8.')) { |
288 | $coll = []; |
462 | $coll = []; |
289 | for ($i = 1; $i <= 185; $i++) { |
463 | for ($i = 1; $i <= 185; $i++) { |
- | 464 | // No conflict between ViaThinkSoft OIDs .1 till .185 |
|
290 | $block4 = dechex(hexdec(substr(sha1('1.3.6.1.4.1.37476.2.5.2.4.8.'.$i), -4)) & 0x3FFF | 0x8000); |
465 | $block4 = dechex(hexdec(substr(sha1('1.3.6.1.4.1.37476.2.5.2.4.8.'.$i), -4)) & 0x3FFF | 0x8000); |
291 | $coll[] = $block4; |
466 | $coll[] = $block4; |
292 | } |
467 | } |
- | 468 | for ($i=0; $i<=0xF; $i++) { |
|
- | 469 | // 0x8000 - 0x800F are used by the system |
|
293 | $coll[] = dechex(0x8000); // System |
470 | $coll[] = dechex(0x8000+$i); |
- | 471 | } |
|
294 | $block4 = dechex(hexdec(substr(sha1($plugin_oid), -4)) & 0x3FFF | 0x8000); |
472 | $block4 = dechex(hexdec(substr(sha1($plugin_oid), -4)) & 0x3FFF | 0x8000); |
295 | if (in_array($block4, $coll)) { |
473 | if (in_array($block4, $coll)) { |
296 | echo "HASH CONFLICT\n"; |
474 | echo "HASH CONFLICT\n"; |
297 | } else { |
475 | } else { |
298 | echo "| (Author) | (NSName) | $plugin_oid | 0x...".strtoupper(substr(sha1($plugin_oid), -4))." | 0x".strtoupper($block4)." |\n"; |
476 | echo "| (Author) | (NSName) | $plugin_oid | 0x...".strtoupper(substr(sha1($plugin_oid), -4))." | 0x".strtoupper($block4)." |\n"; |