# Hash160 - 指令碼與圖表函數

Hash160() 會傳回組合輸入運算式值的 160 位元雜湊。結果為包含 27 個字元的字串。 Hash160() 會傳回組合輸入運算式值的 160 位元雜湊值。結果為包含 27 個字元的字串。 雜湊值對於遮罩個人識別資訊 (PII) 很實用，例如客戶姓名、社會安全號碼或帳號。

語法：

Hash160(expr{, expression})

傳回的資料類型： 字串

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/Scripting/StringFunctions/Hash160.htm)

#### 範例：圖表運算式

| 範例 | 結果 |
| --- | --- |
| Hash160 ( 'abc', 'xyz', '123' ) | 傳回 'MA&5]6+3=:&gt;;&gt;G%S&lt;U\*S2I:`=X*'。 |
| Hash160 ( Region, Year, Month )<br><br>Note: Region, Year, and Month are table fields. | 傳回 'G7\*=6GKPJ(Z+)^KM?&lt;$'AI.)?U$'。 |

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/Scripting/StringFunctions/Hash160.htm)

#### 載入指令碼和結果

```
Hash_160:
Load *, 
Hash160(Region, Year, Month) as Hash160;
Load * inline [
Region, Year, Month
abc, xyz, 123
EU, 2022, 01
UK, 2022, 02
US, 2022, 02 ]; 
```

結果

| 區域 | 年 | 月 | Hash160 |
| --- | --- | --- | --- |
| abc | xyz | 123 | MA&5]6+3=:&gt;;&gt;G%S&lt;U\*S2I:`=X* |
| EU | 2022 | 01 | B40^K&[T@!;VB'XR]&lt;5=//\_F853 |
| UK | 2022 | 02 | O5T;+1?[B&"F&1//MA[MN!T"FWZ |
| US | 2022 | 02 | C6@#]4#\_G-(]J7EQY#KRW`@KF+W |

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/Scripting/StringFunctions/Hash160.htm)

#### 範例：載入指令碼

```
Hash_160:
Load *, 
Hash160(Region, Year, Month) as Hash160;
Load * inline [
Region, Year, Month
abc, xyz, 123
EU, 2022, 01
UK, 2022, 02
US, 2022, 02 ]; 
```

結果

| 區域 | 年 | 月 | Hash160 |
| --- | --- | --- | --- |
| abc | xyz | 123 | MA&5]6+3=:&gt;;&gt;G%S&lt;U\*S2I:`=X* |
| EU | 2022 | 01 | B40^K&[T@!;VB'XR]&lt;5=//\_F853 |
| UK | 2022 | 02 | O5T;+1?[B&"F&1//MA[MN!T"FWZ |
| US | 2022 | 02 | C6@#]4#\_G-(]J7EQY#KRW`@KF+W |