sha256

Calcule le hash SHA-256.

📝 Syntaxe

  • hexa_hash = sha256(str)

  • hexa_hash = sha256(filename)

  • hexa_hash = sha256(str, '-file')

  • hexa_hash = sha256(str, '-string')

📥 Argument d'entrée

  • str - vecteur de caractères, cellule de chaînes ou tableau de chaînes : contenu de la chaîne à hacher

  • filename - chaîne : nom de fichier existant dont le contenu sera haché

  • '-file' or '-string' - force à traiter comme fichier ou contenu de chaîne

📤 Argument de sortie

  • hexa_hash - vecteur de caractères, cellule de chaînes ou tableau de chaînes : résultat haché (checksum)

📄 Description

Calcule la valeur de hachage SHA-256 d'une chaîne ou d'un fichier.

💡 Exemples

R = sha256('Nelson')
R = sha256({'Hello', 'World'})
R = sha256(["Hello"; "World"])
R = sha256([modulepath('matio', 'tests'), '/mat/test_char_array_unicode_7.4_GLNX86.mat'])
R = sha256([modulepath('matio', 'tests'), '/mat/test_char_array_unicode_7.4_GLNX86.mat'], '-file')
R = sha256([modulepath('matio', 'tests'), '/mat/test_char_array_unicode_7.4_GLNX86.mat'], '-string')

🔗 Voir aussi

crc32.

🕔 Historique

Version
📄 Description

1.0.0

version initiale

Last updated

Was this helpful?