---
title: "SHA256"
description: "La fonction SQL SHA256 calcule la valeur de hachage du param\u00E8tre selon l\u0027algorithme SHA256."
language: fr
source_language: en
translation_state: complete
canonical: https://documentation.invantive.eu/fr/docs/invantive-universalsql/grammar/sql-functions/sha256
original: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/sha256
updated: 2026-12-04T14:24:27Z
license: https://documentation.invantive.eu/fr/
---

## Syntaxe
```mermaid
%%{init: {
  'theme': 'base',
  'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
  'themeVariables': {
    'fontSize': '11px',
    'fontFamily': 'Arial'
  }
}}%%
flowchart LR
    Start((START)) --> | | SHA256[SHA256]:::quoted
    SHA256 --> End((END))
```

## Objet
La fonction SQL `SHA256` calcule la valeur de hachage d'un paramètre selon l'algorithme SHA256.

Voir également [[SHA1]], [[SHA384]] et [[SHA512]].

Paramètres :
- Valeur (`varchar2` ou `blob`) : texte ou BLOB pour lequel calculer la valeur de hachage SHA256.

Renvoie : une valeur de hachage.

## Exemples
L'exemple suivant récupère le hachage SHA256 de `abcde` :
```sql
select sha256('abcde')

----------------------------------------------------------------
36bbe50ed96841d10443bcb670d6554f0a34b761be67ec9c4a8ad2c0c44ca42c
```
L'exemple suivant renvoie `null`, car l'élément d'entrée est `null` :
```sql
select sha256(null)

-------------------

```

