2.2.5 Hash String Calculation From Queue Name

The QueueName part of a path name, as specified in [MS-MQMQ] section 2.1.1, can exceed 64 Unicode characters in length. If this occurs, the QueueName must be split and the overflow stored in a second directory attribute. However, the value of the directory attribute that holds the first 64 characters is still required to be unique among all queues hosted by one queue manager, which might not be true if one queue manager hosts multiple queues having long names that differ only by a number at the end, for example. To enforce uniqueness in the first 64 characters, longer names are split at a lower character position, and a hash string computed according to the following algorithm is appended to the first part. See section 3.1.6.1.2.5 for more information on when this is used.

  1. Let QName be a Unicode string initialized to the queue name for which the hash value is calculated.

  2. Let HashValue be a 32-bit integer, initialized to zero.

  3. For each Unicode character in QName, these steps MUST be followed:

    1. The character MUST be converted to lowercase.

    2. Let DownShifted be a 32-bit integer, initialized to the value of HashValue shifted right by eight bits.

    3. The most significant eight bits of the current character MUST be bitwise eXclusive-OR (XORed) with the least significant eight bits of HashValue, and the result MUST be used as an index into the table at the end of this section.

    4. HashValue MUST be set to the value of DownShifted bitwise eXclusive-OR (XORed) with the table value.

    5. DownShifted MUST be set to the value of HashValue shifted right by eight bits.

    6. The least significant eight bits of the current character MUST be bitwise eXclusive-OR (XORed) with the least significant eight bits of HashValue, and the result MUST be used as an index into the table at the end of this section.

    7. HashValue MUST be set to the value of DownShifted bitwise eXclusive-OR (XORed) with the table value.

  4. The hash string MUST be an eight-character hexadecimal Unicode string representation of the final value of HashValue, with the hexadecimal digits 'a' through 'f' represented by lowercase characters.

    Index

    Table value

    0

    0x00000000

    1

    0x82E0FE45

    2

    0x3302DCCD

    3

    0xB1E22288

    4

    0x6605B99A

    5

    0xE4E547DF

    6

    0x55076557

    7

    0xD7E79B12

    8

    0xCC0B7334

    9

    0x4EEB8D71

    10

    0xFF09AFF9

    11

    0x7DE951BC

    12

    0xAA0ECAAE

    13

    0x28EE34EB

    14

    0x990C1663

    15

    0x1BECE826

    16

    0xAED5C62F

    17

    0x2C35386A

    18

    0x9DD71AE2

    19

    0x1F37E4A7

    20

    0xC8D07FB5

    21

    0x4A3081F0

    22

    0xFBD2A378

    23

    0x79325D3D

    24

    0x62DEB51B

    25

    0xE03E4B5E

    26

    0x51DC69D6

    27

    0xD33C9793

    28

    0x04DB0C81

    29

    0x863BF2C4

    30

    0x37D9D04C

    31

    0xB5392E09

    32

    0x6B68AC19

    33

    0xE988525C

    34

    0x586A70D4

    35

    0xDA8A8E91

    36

    0x0D6D1583

    37

    0x8F8DEBC6

    38

    0x3E6FC94E

    39

    0xBC8F370B

    40

    0xA763DF2D

    41

    0x25832168

    42

    0x946103E0

    43

    0x1681FDA5

    44

    0xC16666B7

    45

    0x438698F2

    46

    0xF264BA7A

    47

    0x7084443F

    48

    0xC5BD6A36

    49

    0x475D9473

    50

    0xF6BFB6FB

    51

    0x745F48BE

    52

    0xA3B8D3AC

    53

    0x21582DE9

    54

    0x90BA0F61

    55

    0x125AF124

    56

    0x09B61902

    57

    0x8B56E747

    58

    0x3AB4C5CF

    59

    0xB8543B8A

    60

    0x6FB3A098

    61

    0xED535EDD

    62

    0x5CB17C55

    63

    0xDE518210

    64

    0xD6D15832

    65

    0x5431A677

    66

    0xE5D384FF

    67

    0x67337ABA

    68

    0xB0D4E1A8

    69

    0x32341FED

    70

    0x83D63D65

    71

    0x0136C320

    72

    0x1ADA2B06

    73

    0x983AD543

    74

    0x29D8F7CB

    75

    0xAB38098E

    76

    0x7CDF929C

    77

    0xFE3F6CD9

    78

    0x4FDD4E51

    79

    0xCD3DB014

    80

    0x78049E1D

    81

    0xFAE46058

    82

    0x4B0642D0

    83

    0xC9E6BC95

    84

    0x1E012787

    85

    0x9CE1D9C2

    86

    0x2D03FB4A

    87

    0xAFE3050F

    88

    0xB40FED29

    89

    0x36EF136C

    90

    0x870D31E4

    91

    0x05EDCFA1

    92

    0xD20A54B3

    93

    0x50EAAAF6

    94

    0xE108887E

    95

    0x63E8763B

    96

    0xBDB9F42B

    97

    0x3F590A6E

    98

    0x8EBB28E6

    99

    0x0C5BD6A3

    100

    0xDBBC4DB1

    101

    0x595CB3F4

    102

    0xE8BE917C

    103

    0x6A5E6F39

    104

    0x71B2871F

    105

    0xF352795A

    106

    0x42B05BD2

    107

    0xC050A597

    108

    0x17B73E85

    109

    0x9557C0C0

    110

    0x24B5E248

    111

    0xA6551C0D

    112

    0x136C3204

    113

    0x918CCC41

    114

    0x206EEEC9

    115

    0xA28E108C

    116

    0x75698B9E

    117

    0xF78975DB

    118

    0x466B5753

    119

    0xC48BA916

    120

    0xDF674130

    121

    0x5D87BF75

    122

    0xEC659DFD

    123

    0x6E8563B8

    124

    0xB962F8AA

    125

    0x3B8206EF

    126

    0x8A602467

    127

    0x0880DA22

    128

    0x9B619023

    129

    0x19816E66

    130

    0xA8634CEE

    131

    0x2A83B2AB

    132

    0xFD6429B9

    133

    0x7F84D7FC

    134

    0xCE66F574

    135

    0x4C860B31

    136

    0x576AE317

    137

    0xD58A1D52

    138

    0x64683FDA

    139

    0xE688C19F

    140

    0x316F5A8D

    141

    0xB38FA4C8

    142

    0x026D8640

    143

    0x808D7805

    144

    0x35B4560C

    145

    0xB754A849

    146

    0x06B68AC1

    147

    0x84567484

    148

    0x53B1EF96

    149

    0xD15111D3

    150

    0x60B3335B

    151

    0xE253CD1E

    152

    0xF9BF2538

    153

    0x7B5FDB7D

    154

    0xCABDF9F5

    155

    0x485D07B0

    156

    0x9FBA9CA2

    157

    0x1D5A62E7

    158

    0xACB8406F

    159

    0x2E58BE2A

    160

    0xF0093C3A

    161

    0x72E9C27F

    162

    0xC30BE0F7

    163

    0x41EB1EB2

    164

    0x960C85A0

    165

    0x14EC7BE5

    166

    0xA50E596D

    167

    0x27EEA728

    168

    0x3C024F0E

    169

    0xBEE2B14B

    170

    0x0F0093C3

    171

    0x8DE06D86

    172

    0x5A07F694

    173

    0xD8E708D1

    174

    0x69052A59

    175

    0xEBE5D41C

    176

    0x5EDCFA15

    177

    0xDC3C0450

    178

    0x6DDE26D8

    179

    0xEF3ED89D

    180

    0x38D9438F

    181

    0xBA39BDCA

    182

    0x0BDB9F42

    183

    0x893B6107

    184

    0x92D78921

    185

    0x10377764

    186

    0xA1D555EC

    187

    0x2335ABA9

    188

    0xF4D230BB

    189

    0x7632CEFE

    190

    0xC7D0EC76

    191

    0x45301233

    192

    0x4DB0C811

    193

    0xCF503654

    194

    0x7EB214DC

    195

    0xFC52EA99

    196

    0x2BB5718B

    197

    0xA9558FCE

    198

    0x18B7AD46

    199

    0x9A575303

    200

    0x81BBBB25

    201

    0x035B4560

    202

    0xB2B967E8

    203

    0x305999AD

    204

    0xE7BE02BF

    205

    0x655EFCFA

    206

    0xD4BCDE72

    207

    0x565C2037

    208

    0xE3650E3E

    209

    0x6185F07B

    210

    0xD067D2F3

    211

    0x52872CB6

    212

    0x8560B7A4

    213

    0x078049E1

    214

    0xB6626B69

    215

    0x3482952C

    216

    0x2F6E7D0A

    217

    0xAD8E834F

    218

    0x1C6CA1C7

    219

    0x9E8C5F82

    220

    0x496BC490

    221

    0xCB8B3AD5

    222

    0x7A69185D

    223

    0xF889E618

    224

    0x26D86408

    225

    0xA4389A4D

    226

    0x15DAB8C5

    227

    0x973A4680

    228

    0x40DDDD92

    229

    0xC23D23D7

    230

    0x73DF015F

    231

    0xF13FFF1A

    232

    0xEAD3173C

    233

    0x6833E979

    234

    0xD9D1CBF1

    235

    0x5B3135B4

    236

    0x8CD6AEA6

    237

    0x0E3650E3

    238

    0xBFD4726B

    239

    0x3D348C2E

    240

    0x880DA227

    241

    0x0AED5C62

    242

    0xBB0F7EEA

    243

    0x39EF80AF

    244

    0xEE081BBD

    245

    0x6CE8E5F8

    246

    0xDD0AC770

    247

    0x5FEA3935

    248

    0x4406D113

    249

    0xC6E62F56

    250

    0x77040DDE

    251

    0xF5E4F39B

    252

    0x22036889

    253

    0xA0E396CC

    254

    0x1101B444

    255

    0x93E14A01