Saltar al contenido
uencoder

Securely wipe sensitive datos de memory

Cryptographic claves y plaintext debe ser zeroed de memory después usar. Aprender por qué memset es no enough y cómo a prevent compiler optimization.

  1. 1

    After using a cryptographic key or plaintext, it must be overwritten with zeros in memory. Simply letting the variable go out of scope is insufficient — the data remains in memory until the page is reused. The challenge: compilers optimize away memset(key, 0, len) if the key is never read again.

  2. 2
    Calculadora de hash →

    Hash sensitive data before processing if you need to retain a non-reversible representation. The hash output replaces the plaintext in memory — the original is wiped after hashing.

  3. 3
    Codificador Base64 →

    Codificar sensitive data for transmission, then wipe the original plaintext from memory. The encoded form is not the secret — it is the transport representation. Wipe both after use.

  4. 4

    In C/C++, use explicit_bzero() or a volatile pointer to prevent the compiler from optimizing away the zeroing. In JavaScript, the language does not guarantee memory zeroing — use Uint8Array and overwrite all bytes, but be aware the GC may not immediately reclaim the memory. For truly sensitive operations, use a Web Worker and terminate it after use.

Preguntas frecuentes

Why does the compiler optimize away memset?
If the compiler sees that the buffer is never read after memset(buf, 0, len), it considers the zeroing a "dead store" and removes it for performance. Functions like explicit_bzero use volatile semantics to prevent this optimization.
Is this relevant in JavaScript?
JavaScript strings are immutable and cannot be zeroed — avoid storing secrets in strings. Use Uint8Array (mutable) and overwrite all bytes. However, the GC may copy data during compaction, leaving copies in memory. For maximum security, use a Worker and terminate it, or use WASM with manual memory management.

Flujos que resuelven esta tarea

Convertir Ascii85 a Base64
Decodificar Ascii85 y recodificar como Base64 para mayor compatibilidad.
CANALIZACIÓN
Convertir Base2048 a Base64
Decodificar Base2048 (emoji) y recodificar como Base64 para transporte estándar.
CANALIZACIÓN
Convertir Base32 a Base64
Decodificar una cadena codificada en Base32 a bytes y recodificar como Base64 para una representación más compacta.
CANALIZACIÓN
Convertir Base58 a Base64
Decodificar Base58 y recodificar como Base64 para compatibilidad estándar.
CANALIZACIÓN
Codificar en Base64 y decodificar para verificar ida y vuelta
Codificar texto a Base64 y decodificarlo para verificar que el recorrido de ida y vuelta preserva los datos originales.
CANALIZACIÓN
Blowfish cifrar y luego Base64
Cifrar con Blowfish y luego codificar en Base64 para transporte seguro en texto.
CANALIZACIÓN
DES cifrar y luego Base64
Cifrar con DES y luego codificar en Base64 para compatibilidad heredada.
CANALIZACIÓN
Codificar un payload JSON para transporte por URL
Preparar un documento JSON para un parámetro URL: embellecer, codificar en Base64, luego codificar por ciento — el inverso exacto de la cadena de decodificación de parámetros anidados.
CANALIZACIÓN
AES cifrar y luego codificar en Base64
Cifrar texto plano con AES y codificar el texto cifrado como Base64 para transporte seguro en texto.
CANALIZACIÓN
Hash contenido y codificar como Base64
Calcular un hash de la entrada y codificar el resumen como Base64 para transporte compacto.
CANALIZACIÓN
Hash texto y verificar integridad
Calcular un hash del texto de entrada y compararlo con un hash esperado para verificar la integridad.
CANALIZACIÓN
Hash texto y verificar con suma CRC32
Calcular tanto un hash criptográfico SHA-256 como una suma de verificación CRC32 para verificación de integridad de datos.
CANALIZACIÓN
Convertir Hex a Base64
Decodificar una cadena Hex a bytes y recodificarla como Base64 para transporte compacto.
CANALIZACIÓN
Firmar HMAC y luego codificar en Base64
Generar firma HMAC y luego codificar en Base64 para encabezados de autenticación de API.
CANALIZACIÓN
Hash MD5 y luego codificar en Base58
Calcular hash MD5 y luego codificar como Base58 para representación compacta.
CANALIZACIÓN
Codificar Morse y transporte Base64
Codificar texto como código Morse y luego codificar en Base64 para transporte digital.
CANALIZACIÓN
Comparación de velocidad multi-hash
Hash la entrada y comparar múltiples algoritmos de hash para comparar su velocidad y salida.
CANALIZACIÓN
Generar contraseña y hash
Generar una contraseña aleatoria y luego hash para almacenamiento seguro.
CANALIZACIÓN
RC4 cifrar y luego Base64
Cifrar con RC4 y luego codificar en Base64 para transporte.
CANALIZACIÓN
Hash RIPEMD-160 y luego Base64
Calcular hash RIPEMD-160 y luego codificar en Base64 para transporte.
CANALIZACIÓN
Hash SHA3-256 con suma CRC32
Calcular hash SHA3-256 y luego suma CRC32 para verificación dual de integridad.
CANALIZACIÓN
Hash SHA-512 y luego Hex
Calcular hash SHA-512 y luego codificar como Hex para legibilidad.
CANALIZACIÓN
Invertir texto y hash
Invertir texto y luego calcular el hash SHA-256 del resultado invertido.
CANALIZACIÓN
Mezclar texto y hash
Mezclar texto y luego hash del resultado mezclado.
CANALIZACIÓN
Barajar texto y codificar Base64
Barajar caracteres de texto y luego codificar en Base64 el resultado.
CANALIZACIÓN
Escape Unicode y codificar Base64
Escapar texto Unicode y luego codificar en Base64 para transporte seguro en ASCII.
CANALIZACIÓN
Codificar URL y luego doble Base64
Codificar URL y luego codificar en Base64 para doble codificacion en payloads API.
CANALIZACIÓN
UUencode y luego Base64
Codificar texto con UUencode y luego codificar en Base64 el resultado para doble codificacion.
CANALIZACIÓN
Generar UUID y codificar Base64
Generar un UUID y codificarlo en Base64 para almacenamiento compacto.
CANALIZACIÓN

Herramientas relacionadas