Files
fn_registry/python/functions/cybersecurity/hash_sha256.md
T
egutierrez 95959f713c feat: funciones Python para core, cybersecurity, datascience y finance
Agrega funciones Python reutilizables organizadas por dominio:
- core: composicion funcional (pipe, compose, map, filter, reduce, etc.)
- cybersecurity: analisis de amenazas y puertos
- datascience: estadisticas y deteccion de outliers
- finance: indicadores tecnicos y analisis financiero
2026-03-29 00:13:50 +01:00

33 lines
730 B
Markdown

---
name: hash_sha256
kind: function
lang: py
domain: cybersecurity
version: "1.0.0"
purity: pure
signature: "def hash_sha256(data: bytes) -> str"
description: "Calcula el hash SHA-256 de datos binarios. Retorna hex digest."
tags: [hash, sha256, crypto, python]
uses_functions: []
uses_types: []
returns: []
returns_optional: false
error_type: ""
imports: [hashlib]
tested: false
tests: []
test_file_path: ""
file_path: "python/functions/cybersecurity/cybersecurity.py"
---
## Ejemplo
```python
h = hash_sha256(b"hello")
# "2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824"
```
## Notas
Usa hashlib de stdlib. Funcion pura sin side effects. SHA-256 produce un digest de 64 caracteres hexadecimales (256 bits).