hexa_hash = crc32(str)
hexa_hash = crc32(filename)
hexa_hash = crc32(str, '-file')
hexa_hash = crc32(str, '-string')
hexa_hash = crypto.crc32(...)
| Paramètre | Description |
|---|---|
| str | chaîne ou octets : données à hacher |
| filename | une chaîne : nom de fichier existant : le contenu du fichier sera haché. |
| '-file' or '-string' | force le hachage comme contenu de fichier ou de chaîne. |
| Paramètre | Description |
|---|---|
| hexa_hash | entier : valeur CRC32 |
Calcule la valeur CRC32 d'une chaîne de caractères ou d'un fichier.
crypto.crc32 est un alias de crc32, dans l'espace de noms crypto partagé avec crypto.ed25519.verify et crypto.ed25519.sign.
R = crc32('Nelson')
R = crc32({'Hello', 'World'})
R = crc32(["Hello"; "World"])
R = crc32([modulepath('matio', 'tests'), '/mat/test_char_array_unicode_7.4_GLNX86.mat'])
R = crc32([modulepath('matio', 'tests'), '/mat/test_char_array_unicode_7.4_GLNX86.mat'], '-file')
R = crc32([modulepath('matio', 'tests'), '/mat/test_char_array_unicode_7.4_GLNX86.mat'], '-string')
| Version | Description |
|---|---|
| 1.15.0 | version initiale |