Files
fn_registry/python/functions/cybersecurity/is_base64.md
T
egutierrez 47fac22230 chore: auto-commit (799 archivos)
- .claude/CLAUDE.md
- .claude/commands/subagentes.md
- .claude/rules/INDEX.md
- .mcp.json
- bash/functions/cybersecurity/analyze_dns.md
- bash/functions/cybersecurity/audit_http_headers.md
- bash/functions/cybersecurity/audit_ssh_config.md
- bash/functions/cybersecurity/check_firewall.md
- bash/functions/cybersecurity/detect_suspicious_users.md
- bash/functions/cybersecurity/encrypt_file.md
- ...

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 00:28:20 +02:00

43 lines
987 B
Markdown

---
name: is_base64
kind: function
lang: py
domain: cybersecurity
version: "1.0.0"
purity: pure
signature: "def is_base64(s: str) -> bool"
description: "Verifica si un string es base64 valido. Acepta base64 estandar y URL-safe. Requiere minimo 4 caracteres."
tags: [base64, validation, encoding, python, pendiente-usar]
uses_functions: []
uses_types: []
returns: []
returns_optional: false
error_type: ""
imports: [re, base64]
params:
- name: s
desc: "string a validar como base64"
output: "booleano indicando si el string es base64 valido (minimo 4 caracteres)"
tested: false
tests: []
test_file_path: ""
file_path: "python/functions/cybersecurity/cybersecurity.py"
---
## Ejemplo
```python
is_base64("aGVsbG8=")
# True
is_base64("not!valid")
# False
is_base64("ab")
# False (menos de 4 caracteres)
```
## Notas
Verifica tanto el formato (regex) como que el decode sea exitoso. Util para detectar datos codificados en payloads sospechosos, headers HTTP o parametros de URL.