# Windows Cryptography C++ Samples

Windows C++ cryptography examples including hash calculation, AES encryption/decryption, and Base64 encoding/decoding

> Canonical page: https://elysiatools.com/en/samples/windows-cryptography-cpp

- **Category:** C++

- **Keywords:** cpp, c++, windows, cryptography, hash, aes, base64, encryption, decryption

## Overview

Windows C++ cryptography examples including hash calculation, AES encryption/decryption, and Base64 encoding/decoding

## Examples

- **Hash Calculation**: Calculate MD5, SHA1, SHA256, and SHA512 hash values for strings and files using Windows Cryptography API
- **AES Encryption/Decryption**: Implement AES-256 encryption and decryption using Windows Cryptography API (CNG)
- **Base64 Encoding/Decoding**: Encode binary data to Base64 strings and decode Base64 strings back to binary data using Windows API

## When to use

- Use this sample set when you want reference inputs for Windows Cryptography C++ Samples.
- Use it to preview output formats and compare related sample variants.

## How it works

- Open a sample entry to inspect the prepared example payload or asset.
- Compare it with related tools to understand how the workflow connects.

## Use cases

- Hash Calculation
- AES Encryption/Decryption
- Base64 Encoding/Decoding

## Frequently asked questions

### What is included in Windows Cryptography C++ Samples?

This page includes curated sample entries, related tools, and neighboring sample collections for Windows Cryptography C++ Samples.

## Related tools

- [Hash Algorithm Comparator](https://elysiatools.com/en/tools/hash-algorithm-comparator): Hash the same input with MD5, SHA-1, SHA-256, SHA-512, BLAKE2b, and BLAKE3 at the same time and compare them side by side: output length, hex/Base64 digest, security status (broken / modern), and a relative speed benchmark. Great for teaching, choosing a hashing algorithm, or sanity-checking checksums.
- [Text Encryptor/Decryptor](https://elysiatools.com/en/tools/text-encryptor-decryptor): Simple text encryption and decryption using various algorithms
- [Windows PE / Linux ELF / Mach-O Binary Header, Section, Import & Export Inspector](https://elysiatools.com/en/tools/windows-pe-linux-elf-mach-o-binary-header-section-import-export-inspector): Upload a PE-COFF (.exe/.dll), ELF or Mach-O binary and parse its headers end to end: DOS/PE signature, COFF machine, optional header (entry point, image base, subsystem, ASLR/NX/CFG), section table with RVA↔offset mapping, import/export directories, ELF program headers and PIE detection, dynamic symbols and DT_NEEDED, Mach-O load commands and dylibs — with cross-architecture annotations and a hex preview.
- [AES Encryption Tool](https://elysiatools.com/en/tools/aes-encryption-tool): Encrypt or decrypt text and files with AES-256-GCM and export IV-based bundles
- [RSA Encrypt / Decrypt](https://elysiatools.com/en/tools/rsa-encrypt-decrypt): Encrypt text with an RSA public key or decrypt ciphertext with the matching private key, using OAEP padding (SHA-1 or SHA-256). Handles long messages by chunking. Keys and data stay local. PKCS#1 v1.5 is intentionally not offered (Node disables it for decryption due to Bleichenbacher attacks).
- [Atbash Cipher](https://elysiatools.com/en/tools/atbash-cipher): Encode and decode text using Atbash substitution cipher (reverses the alphabet)
- [Hash Generator](https://elysiatools.com/en/tools/hash-generator): Generate hash values (MD5, SHA1, SHA256, SHA512)
- [RC4 Stream Cipher](https://elysiatools.com/en/tools/rc4-encryptor): Encrypt and decrypt text using RC4 stream cipher with a key

## Related content

- [Windows Desktop Features C++ Samples](https://elysiatools.com/en/samples/windows-desktop-features-cpp): Windows C++ desktop-specific features including file dialogs, message boxes, and system tray
- [Windows File Operations - C++ Samples](https://elysiatools.com/en/samples/windows-file-operations-cpp): Comprehensive C++ file operations examples for Windows platform including text file I/O, file copying, and directory traversal
- [Windows Serialization C++ Samples](https://elysiatools.com/en/samples/windows-serialization-cpp): Windows C++ data serialization examples including JSON serialization/deserialization and XML parsing
- [Windows String Processing - C++ Samples](https://elysiatools.com/en/samples/windows-string-processing-cpp): Comprehensive C++ string processing examples for Windows platform including concatenation, regular expressions, and replacement operations
- [Windows Web Features C++ Samples](https://elysiatools.com/en/samples/windows-web-features-cpp): Windows C++ web server development examples including URL routing, middleware, and static file serving
- [Android Cryptography Java Samples](https://elysiatools.com/en/samples/android-cryptography-java): Android Java cryptography examples including hash calculation, AES encryption/decryption, and Base64 encoding
