# Hash160 – função de script e gráfico

Hash160() retorna um hash de 160 bits dos valores combinados de expressão de entrada. O resultado é uma string de 27 caracteres. Hash160() retorna um valor de hash de 160 bits dos valores combinados de expressão de entrada. O resultado é uma string de 27 caracteres. Os valores hash são úteis para mascarar informações de identificação pessoal (PII), como nomes de clientes, números de previdência social ou números de conta.

Sintaxe:

Hash160(expr{, expression})

Tipo de dados de retorno: caractere

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

#### Exemplo: expressões de gráfico

| Exemplo | Resultado |
| --- | --- |
| Hash160 ( 'abc', 'xyz', '123' ) | Retorna '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. | Retorna 'G7\*=6GKPJ(Z+)^KM?&lt;$'AI.)?U$'. |

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

#### Script de carregamento e resultados

```
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 ]; 
```

Resultado

| Região | Ano | Mês | 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)

#### Exemplo: script de carregamento

```
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 ]; 
```

Resultado

| Região | Ano | Mês | 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 |