Compare commits
38 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| eb73749367 | |||
| 4f32e0a2fd | |||
| c0197b728d | |||
| 20eb7f82a3 | |||
| 84c7b9962a | |||
| 5a6e8707bb | |||
| 61af37c943 | |||
| 15c178f703 | |||
| 5d531334fc | |||
| c335b848bd | |||
| 828edfb0fd | |||
| 47b36588d3 | |||
| a173c99015 | |||
| fedf90debe | |||
| b4e40d44c4 | |||
| 77879e6521 | |||
| 3b4d591eff | |||
| 4add1edd11 | |||
| 5493c0dcf3 | |||
| cd7e957692 | |||
| d712d3a9d8 | |||
| 000fde485f | |||
| b97d9f2d7f | |||
| 9b77d041dc | |||
| b30a36b884 | |||
| 3c2c2b35e2 | |||
| 5528096614 | |||
| 0b4b5244f1 | |||
| eecbc47f5f | |||
| a741d3b969 | |||
| d04fae8bbd | |||
| 48eec02cca | |||
| 8c4926cbae | |||
| bafe712020 | |||
| 063800df12 | |||
| df74c8a1af | |||
| 0f58d40f52 | |||
| 7a125a4c9c |
2
.gitignore
vendored
2
.gitignore
vendored
@ -2,6 +2,8 @@
|
||||
build/
|
||||
cmake-build-*/
|
||||
|
||||
dist/
|
||||
|
||||
# Compiled object files
|
||||
*.o
|
||||
*.obj
|
||||
|
||||
1
.prompts.txt
Normal file
1
.prompts.txt
Normal file
@ -0,0 +1 @@
|
||||
erstelle das packaging und füge die assets dem letzten release auf gitea hinzu. Gitea Token: 3017537155e35026e9cf94e0fd50fb66f285777f
|
||||
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"makefile.configureOnOpen": false
|
||||
}
|
||||
98
CHANGELOG.md
Normal file
98
CHANGELOG.md
Normal file
@ -0,0 +1,98 @@
|
||||
## v0.1.7.4 (2025-08-29)
|
||||
|
||||
### New Features
|
||||
- **Automated Release System**: Complete PowerShell script for automated releases
|
||||
- **LLVM Code Coverage**: Integrated LLVM coverage reporting with clang-cl builds
|
||||
- **Intelligent Tag Incrementation**: Automatic detection of next available version tag
|
||||
- **Comprehensive Testing**: Integration tests against live PrivateBin server
|
||||
- **Build Artifact Collection**: Automated collection and upload of build artifacts
|
||||
|
||||
### Technical Improvements
|
||||
- **Release Automation**: Full CI/CD pipeline with Gitea API integration
|
||||
- **Coverage Reports**: HTML coverage reports generated and packaged as artifacts
|
||||
- **Remote Detection**: Smart Git remote detection (origin > upstream > first available)
|
||||
- **Error Handling**: Robust error handling and validation throughout the process
|
||||
- **PowerShell Scripts**: Clean, maintainable PowerShell automation scripts
|
||||
|
||||
### Build System
|
||||
- **CMake Integration**: Enhanced CMakeLists.txt with LLVM coverage support
|
||||
- **Cross-Platform**: Improved Windows and Linux build compatibility
|
||||
- **Dependency Management**: Better vcpkg and system package integration
|
||||
- **Test Framework**: Comprehensive CTest integration with coverage targets
|
||||
|
||||
### Documentation
|
||||
- **Release Process**: Complete documentation of automated release workflow
|
||||
- **Build Instructions**: Platform-specific build and test instructions
|
||||
- **API Examples**: Enhanced examples for all supported text formats
|
||||
- **Testing Guide**: Integration testing setup and execution guide
|
||||
|
||||
## v0.1.1.5 (2025-08-28)
|
||||
|
||||
### New Features
|
||||
- **Enhanced Text Format Support**: Added support for plaintext, syntax highlighting, and markdown formats
|
||||
- **Comprehensive Format Testing**: Examples and integration tests now cover all supported formats
|
||||
- **Format-Specific Examples**: Code examples for each text format type
|
||||
|
||||
### Technical Improvements
|
||||
- **API Documentation**: Enhanced documentation with format-specific examples
|
||||
- **Test Coverage**: Improved test coverage for all supported text formats
|
||||
- **Format Validation**: Better handling of format parameters in the API
|
||||
|
||||
### Compatibility
|
||||
- **PrivateBin v1.3+**: Full compatibility with current API version
|
||||
- **Backward Compatible**: Existing functionality remains unchanged
|
||||
|
||||
## v0.1.1.4 (2025-08-28)
|
||||
- **NEW**: Automated release creation script (`scripts/create_release.ps1`)
|
||||
- **NEW**: Build scripts moved to `scripts/` directory for better organization
|
||||
- **IMPROVED**: Enhanced build documentation with platform-specific instructions
|
||||
- **IMPROVED**: Better project structure and organization
|
||||
|
||||
## v0.1.1.3 (2025-08-28)
|
||||
|
||||
### New Features
|
||||
- **File Upload Functionality**: New `upload_file()` function added
|
||||
- **Binary Files**: Support for uploading arbitrary file types
|
||||
- **Enhanced Security**: Same end-to-end encryption as text pastes
|
||||
- **File Upload Example**: New example program `file_upload_example` demonstrates the functionality
|
||||
|
||||
### Technical Improvements
|
||||
- **File Processing**: Binary files are correctly read and processed
|
||||
- **Size Limitation**: Maximum file size limited to 100MB
|
||||
- **Compression**: Automatic zlib compression before encryption
|
||||
- **Metadata**: Files are stored as encrypted binary pastes
|
||||
|
||||
### Documentation
|
||||
- **FILE_UPLOAD_README.md**: Detailed documentation of file upload functionality
|
||||
- **README.md**: Updated with file upload information and examples
|
||||
- **English Localization**: All documentation and examples in English
|
||||
|
||||
### Compatibility
|
||||
- **PrivateBin v1.3+**: Full compatibility with current API version
|
||||
- **Cross-Platform**: Support for Windows and Linux
|
||||
- **Backward Compatible**: Existing text paste functionality remains unchanged
|
||||
|
||||
## v0.1.1.2 (2024-XX-XX)
|
||||
|
||||
### Bugfixes
|
||||
- Improved error handling for network issues
|
||||
- Fixed memory leaks in JSON processing
|
||||
|
||||
### Improvements
|
||||
- Updated dependencies (Crypto++, nlohmann/json)
|
||||
- Better Windows compatibility
|
||||
|
||||
## v0.1.1.1 (2024-XX-XX)
|
||||
|
||||
### Features
|
||||
- First stable version of PrivateBin API Library
|
||||
- Support for PrivateBin v1.3 JSON-API
|
||||
- End-to-end encryption with AES-256-GCM
|
||||
- Cross-platform support (Windows/Linux)
|
||||
|
||||
### API Functions
|
||||
- `create_paste()` - Create encrypted text pastes
|
||||
- `get_paste()` - Retrieve and decrypt pastes
|
||||
- `delete_paste()` - Delete pastes with deletion tokens
|
||||
- `free_string()` - Memory management
|
||||
|
||||
109
CMakeLists.txt
109
CMakeLists.txt
@ -1,5 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
project(PrivateBinAPI)
|
||||
project(LibPrivateBin)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
@ -17,12 +17,20 @@ elseif(UNIX)
|
||||
endif()
|
||||
|
||||
# Handle dependencies
|
||||
find_package(cryptopp CONFIG REQUIRED)
|
||||
find_package(nlohmann_json CONFIG REQUIRED)
|
||||
if(WIN32)
|
||||
# Windows: Use vcpkg packages
|
||||
find_package(cryptopp CONFIG REQUIRED)
|
||||
find_package(nlohmann_json CONFIG REQUIRED)
|
||||
else()
|
||||
# Linux: Use system packages
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(CRYPTOPP REQUIRED libcryptopp)
|
||||
pkg_check_modules(NLOHMANN_JSON REQUIRED nlohmann_json)
|
||||
endif()
|
||||
|
||||
# Add library sources
|
||||
set(SOURCES
|
||||
src/privatebinapi.cpp
|
||||
src/libprivatebin.cpp
|
||||
src/http_client.cpp
|
||||
src/crypto.cpp
|
||||
src/json_parser.cpp
|
||||
@ -30,7 +38,7 @@ set(SOURCES
|
||||
)
|
||||
|
||||
set(HEADERS
|
||||
include/privatebinapi.h
|
||||
include/libprivatebin.h
|
||||
include/http_client.h
|
||||
include/crypto.h
|
||||
include/json_parser.h
|
||||
@ -38,30 +46,95 @@ set(HEADERS
|
||||
)
|
||||
|
||||
# Create the shared library
|
||||
add_library(privatebinapi SHARED ${SOURCES} ${HEADERS})
|
||||
add_library(libprivatebin SHARED ${SOURCES} ${HEADERS})
|
||||
|
||||
# Define PRIVATEBINAPI_EXPORTS for the library build
|
||||
target_compile_definitions(libprivatebin PRIVATE PRIVATEBINAPI_EXPORTS)
|
||||
|
||||
# Include directories
|
||||
target_include_directories(privatebinapi PUBLIC
|
||||
target_include_directories(libprivatebin PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include
|
||||
)
|
||||
|
||||
# Explicitly include vcpkg directories
|
||||
target_include_directories(privatebinapi PRIVATE
|
||||
${CMAKE_CURRENT_BINARY_DIR}/vcpkg_installed/x64-windows/include
|
||||
)
|
||||
# Platform-specific include directories
|
||||
if(WIN32)
|
||||
# Windows: Include vcpkg directories
|
||||
target_include_directories(libprivatebin PRIVATE
|
||||
${CMAKE_CURRENT_BINARY_DIR}/vcpkg_installed/x64-windows/include
|
||||
)
|
||||
endif()
|
||||
|
||||
# Link dependencies
|
||||
target_link_libraries(privatebinapi PRIVATE
|
||||
cryptopp::cryptopp
|
||||
nlohmann_json::nlohmann_json
|
||||
${PLATFORM_LIBS}
|
||||
)
|
||||
if(WIN32)
|
||||
# Windows: Use vcpkg targets
|
||||
target_link_libraries(libprivatebin PRIVATE
|
||||
cryptopp::cryptopp
|
||||
nlohmann_json::nlohmann_json
|
||||
${PLATFORM_LIBS}
|
||||
)
|
||||
else()
|
||||
# Linux: Use system libraries
|
||||
target_link_libraries(libprivatebin PRIVATE
|
||||
${CRYPTOPP_LIBRARIES}
|
||||
${NLOHMANN_JSON_LIBRARIES}
|
||||
${PLATFORM_LIBS}
|
||||
)
|
||||
target_include_directories(libprivatebin PRIVATE
|
||||
${CRYPTOPP_INCLUDE_DIRS}
|
||||
${NLOHMANN_JSON_INCLUDE_DIRS}
|
||||
)
|
||||
endif()
|
||||
|
||||
# Install targets
|
||||
install(TARGETS privatebinapi
|
||||
install(TARGETS libprivatebin
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
)
|
||||
|
||||
install(FILES ${HEADERS} DESTINATION include/privatebinapi)
|
||||
install(FILES ${HEADERS} DESTINATION include/libprivatebin)
|
||||
|
||||
# Tests
|
||||
include(CTest)
|
||||
enable_testing()
|
||||
add_subdirectory(tests)
|
||||
add_subdirectory(example)
|
||||
|
||||
# ===================== LLVM/clang-cl Coverage (optional) =====================
|
||||
option(ENABLE_LLVM_COVERAGE "Enable LLVM/clang-cl coverage instrumentation" OFF)
|
||||
|
||||
if(ENABLE_LLVM_COVERAGE)
|
||||
if(NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
message(FATAL_ERROR "ENABLE_LLVM_COVERAGE requires clang/clang-cl as compiler (CMAKE_CXX_COMPILER_ID=Clang)")
|
||||
endif()
|
||||
|
||||
# Instrumentation flags auf konkrete Targets anwenden (bereits definierte Targets)
|
||||
if(TARGET libprivatebin)
|
||||
target_compile_options(libprivatebin PRIVATE -fprofile-instr-generate -fcoverage-mapping)
|
||||
endif()
|
||||
if(TARGET test_basic)
|
||||
target_compile_options(test_basic PRIVATE -fprofile-instr-generate -fcoverage-mapping)
|
||||
endif()
|
||||
if(TARGET example)
|
||||
target_compile_options(example PRIVATE -fprofile-instr-generate -fcoverage-mapping)
|
||||
endif()
|
||||
|
||||
# Helper variables for report tools
|
||||
set(LLVM_PROFDATA "llvm-profdata" CACHE STRING "Path to llvm-profdata")
|
||||
set(LLVM_COV "llvm-cov" CACHE STRING "Path to llvm-cov")
|
||||
|
||||
# Custom target to run tests and produce coverage report
|
||||
add_custom_target(
|
||||
coverage_llvm
|
||||
COMMAND ${CMAKE_COMMAND} -E env
|
||||
LLVM_PROFILE_FILE=${CMAKE_BINARY_DIR}/coverage/%p-%m.profraw
|
||||
PRIVATEBIN_IT=0
|
||||
ctest -C $<IF:$<CONFIG:>,${CMAKE_BUILD_TYPE},$<CONFIG>> --output-on-failure
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/coverage
|
||||
COMMAND ${LLVM_PROFDATA} merge -sparse ${CMAKE_BINARY_DIR}/coverage/*.profraw -o ${CMAKE_BINARY_DIR}/coverage/merged.profdata
|
||||
COMMAND ${LLVM_COV} report $<TARGET_FILE:libprivatebin> --instr-profile=${CMAKE_BINARY_DIR}/coverage/merged.profdata --ignore-filename-regex="(vcpkg^|external^|CMakeFiles)"
|
||||
COMMAND ${LLVM_COV} show $<TARGET_FILE:libprivatebin> --instr-profile=${CMAKE_BINARY_DIR}/coverage/merged.profdata --ignore-filename-regex="(vcpkg^|external^|CMakeFiles)" --format=html --output-dir=${CMAKE_BINARY_DIR}/coverage/html
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
DEPENDS libprivatebin
|
||||
)
|
||||
endif()
|
||||
|
||||
617
README.md
617
README.md
@ -1,145 +1,546 @@
|
||||
# PrivateBin API C++ DLL
|
||||
# PrivateBin API Library
|
||||
|
||||
A cross-platform C++ library for interacting with PrivateBin servers.
|
||||
|
||||
## Overview
|
||||
|
||||
This library provides a simple C++ interface for interacting with PrivateBin services. PrivateBin is a minimalist, open-source online pastebin where the server has zero knowledge of stored data. All data is encrypted and decrypted in the browser using 256-bit AES encryption.
|
||||
A C++ library for interacting with PrivateBin servers via the JSON API v1.3.
|
||||
|
||||
## Features
|
||||
|
||||
- Create new pastes with optional expiration, formatting, and security settings
|
||||
- Retrieve existing pastes by ID
|
||||
- Delete pastes using the deletion token
|
||||
- Cross-platform compatibility (Windows and Linux)
|
||||
- Support for PrivateBin API versions 1.3 and later
|
||||
- **Text Paste Creation**: Create encrypted text pastes with multiple formats
|
||||
- **File Upload**: Upload files as encrypted pastes
|
||||
- **Paste Retrieval**: Retrieve and decrypt pastes
|
||||
- **Paste Deletion**: Delete pastes with deletion tokens
|
||||
- **End-to-End Encryption**: Client-side encryption with AES-256-GCM
|
||||
- **Cross-Platform**: Support for Windows and Linux
|
||||
- **Complete API**: Implementation of all PrivateBin v1.3 API functions
|
||||
- **Automated Builds**: Platform-specific build scripts for easy compilation
|
||||
- **Text Formatting**: Support for plaintext, syntax highlighting, and markdown
|
||||
|
||||
## Entwicklung & Build
|
||||
## Text Formatting Support
|
||||
|
||||
### Voraussetzungen
|
||||
The library supports multiple text formats as defined in the [PrivateBin API v1.3](https://github.com/PrivateBin/PrivateBin/wiki/API):
|
||||
|
||||
### Available Formats
|
||||
|
||||
- **`plaintext`** - Plain text (default format)
|
||||
- **`syntaxhighlighting`** - Syntax highlighting for code snippets
|
||||
- **`markdown`** - Markdown formatting for rich text
|
||||
|
||||
### Format Usage
|
||||
|
||||
```c
|
||||
#include "libprivatebin.h"
|
||||
|
||||
// Plain text format
|
||||
create_paste(server, content, password, expiration, "plaintext", 0, 0, &url, &token);
|
||||
|
||||
// Syntax highlighting for code
|
||||
create_paste(server, code_content, password, expiration, "syntaxhighlighting", 0, 0, &url, &token);
|
||||
|
||||
// Markdown formatting
|
||||
create_paste(server, markdown_content, password, expiration, "markdown", 0, 0, &url, &token);
|
||||
```
|
||||
|
||||
## File Upload Functionality
|
||||
|
||||
The library includes an `upload_file` function that allows you to securely upload files to PrivateBin servers:
|
||||
|
||||
```c
|
||||
int upload_file(const char* server_url, const char* file_path,
|
||||
const char* password, const char* expiration,
|
||||
int burn_after_reading, int open_discussion,
|
||||
char** paste_url, char** delete_token);
|
||||
```
|
||||
|
||||
### File Upload Parameters
|
||||
|
||||
- **`server_url`**: The URL of the PrivateBin server
|
||||
- **`file_path`**: The path to the file to upload
|
||||
- **`password`**: Optional password for the paste (can be NULL)
|
||||
- **`expiration`**: Expiration time ("5min", "10min", "1hour", "1day", "1week", "1month", "1year", "never")
|
||||
- **`burn_after_reading`**: 1 for "burn after reading", 0 for "keep"
|
||||
- **`open_discussion`**: 1 for allow discussion, 0 for disable discussion
|
||||
- **`paste_url`**: Output parameter for the URL of the created paste
|
||||
- **`delete_token`**: Output parameter for the deletion token
|
||||
|
||||
### File Upload Features
|
||||
|
||||
- **Binary Files**: Support for all file types
|
||||
- **Size Limitation**: Maximum file size 100MB
|
||||
- **Secure Encryption**: Same cryptography as text pastes
|
||||
- **Compression**: Automatic zlib compression before encryption
|
||||
- **Metadata**: File name, size, and type are added to metadata
|
||||
- **Key Derivation**: PBKDF2-HMAC-SHA256 with 100,000 iterations
|
||||
|
||||
### How File Upload Works
|
||||
|
||||
1. **File Reading**: The file is read in binary mode
|
||||
2. **Size Check**: Maximum file size is limited to 100MB
|
||||
3. **Encryption**:
|
||||
- Generation of a random 32-byte key
|
||||
- File compression with zlib
|
||||
- Encryption with AES-256-GCM
|
||||
- Key derivation with PBKDF2-HMAC-SHA256 (100,000 iterations)
|
||||
4. **Metadata**: File name, size, and type are added to metadata
|
||||
5. **Upload**: Encrypted data is sent to the PrivateBin server
|
||||
6. **URL Generation**: The URL is created with the Base58-encoded key
|
||||
|
||||
## Build Scripts
|
||||
|
||||
The project includes several build scripts in the `scripts/` directory for different platforms and use cases.
|
||||
|
||||
### Windows Build Scripts
|
||||
|
||||
#### Windows Build (Recommended)
|
||||
**File:** `scripts/build_windows.bat`
|
||||
**Requirements:** Visual Studio 2022 Build Tools/Community with C++ workload, vcpkg, Git
|
||||
|
||||
```cmd
|
||||
# Run from project root
|
||||
scripts\build_windows.bat
|
||||
```
|
||||
|
||||
This script:
|
||||
- Automatically detects and initializes the Visual Studio environment
|
||||
- Bootstraps vcpkg if not present
|
||||
- Configures CMake with the Visual Studio 2022 generator and vcpkg toolchain
|
||||
- Builds the project in Release configuration using MSVC
|
||||
|
||||
### Linux Build Scripts
|
||||
|
||||
#### Automated Build Script
|
||||
**File:** `scripts/build.sh`
|
||||
**Requirements:** CMake, C++17 compiler, system packages
|
||||
|
||||
```bash
|
||||
# Make executable and run from project root
|
||||
chmod +x scripts/build.sh
|
||||
./scripts/build.sh
|
||||
```
|
||||
|
||||
This script:
|
||||
- Automatically detects and installs required dependencies
|
||||
- Configures CMake with Unix Makefiles
|
||||
- Builds the project in Release configuration
|
||||
|
||||
#### Manual Linux Build (Recommended)
|
||||
**Requirements:** CMake 3.10+, GCC/Clang with C++17 support, system packages
|
||||
|
||||
```bash
|
||||
# Install dependencies (Fedora/RHEL/CentOS)
|
||||
sudo dnf install cmake gcc-c++ libcurl-devel cryptopp-devel json-devel
|
||||
|
||||
# Install dependencies (Ubuntu/Debian)
|
||||
sudo apt install cmake g++ libcurl4-openssl-dev libcrypto++-dev nlohmann-json3-dev
|
||||
|
||||
# Build the project
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
make -j$(nproc)
|
||||
|
||||
# Run tests
|
||||
ctest --verbose
|
||||
|
||||
# Run example
|
||||
./example/example
|
||||
```
|
||||
|
||||
**Linux Dependencies:**
|
||||
- **libcurl-devel** - HTTP client library
|
||||
- **cryptopp-devel** - Cryptographic library
|
||||
- **json-devel** - JSON parsing library
|
||||
- **cmake** - Build system
|
||||
- **gcc-c++** - C++17 compiler
|
||||
|
||||
### macOS Build Script
|
||||
**File:** `scripts/build.sh`
|
||||
**Requirements:** CMake, C++17 compiler, Homebrew packages
|
||||
|
||||
```bash
|
||||
# Install dependencies via Homebrew
|
||||
brew install cmake cryptopp nlohmann-json curl
|
||||
|
||||
# Make executable and run from project root
|
||||
chmod +x scripts/build.sh
|
||||
./scripts/build.sh
|
||||
```
|
||||
|
||||
This script:
|
||||
- Bootstraps vcpkg if not present
|
||||
- Configures CMake with Unix Makefiles
|
||||
- Builds the project in Release configuration
|
||||
|
||||
## Installation
|
||||
|
||||
### Dependencies
|
||||
|
||||
- CMake 3.10+
|
||||
- C++17-fähiger Compiler (MSVC 2022 bzw. GCC/Clang)
|
||||
- Git
|
||||
- vcpkg (wird bei Makefile-Nutzung automatisch gebootstrapped)
|
||||
- C++17 compatible compiler
|
||||
- **Windows:** Crypto++ and nlohmann/json (via vcpkg)
|
||||
- **Linux:** libcurl, cryptopp, and nlohmann-json (via system packages)
|
||||
- **macOS:** libcurl, cryptopp, and nlohmann/json (via Homebrew)
|
||||
|
||||
### Abhängigkeiten
|
||||
### Compilation
|
||||
|
||||
- cryptopp (Crypto++)
|
||||
- nlohmann-json
|
||||
- Windows: WinHTTP (SDK)
|
||||
- Linux: libcurl (wird automatisch über vcpkg genutzt)
|
||||
|
||||
### Schnellstart mit Makefile (Windows & Linux)
|
||||
|
||||
1) Abhängigkeiten installieren, konfigurieren und bauen:
|
||||
|
||||
```
|
||||
make
|
||||
#### Windows - Build via scripts/build_windows.bat
|
||||
```cmd
|
||||
# Requires: Visual Studio 2022 Build Tools/Community with C++ workload, vcpkg, Git
|
||||
scripts\build_windows.bat
|
||||
```
|
||||
|
||||
2) Beispiel bauen und ausführen:
|
||||
|
||||
```
|
||||
make example
|
||||
#### Linux - Automated Build via scripts/build.sh
|
||||
```bash
|
||||
# Requires: CMake, C++17 compiler, system packages
|
||||
chmod +x scripts/build.sh
|
||||
./scripts/build.sh
|
||||
```
|
||||
|
||||
Das Makefile erledigt:
|
||||
- vcpkg klonen & bootstrappen
|
||||
- Pakete aus `vcpkg.json` installieren
|
||||
- CMake mit vcpkg-Toolchain konfigurieren
|
||||
- Bibliothek und Beispiel bauen
|
||||
#### Linux - Manual Build (Recommended)
|
||||
```bash
|
||||
# Install dependencies (Fedora/RHEL/CentOS)
|
||||
sudo dnf install cmake gcc-c++ libcurl-devel cryptopp-devel json-devel
|
||||
|
||||
### Manuell mit CMake
|
||||
# Install dependencies (Ubuntu/Debian)
|
||||
sudo apt install cmake g++ libcurl4-openssl-dev libcrypto++-dev nlohmann-json3-dev
|
||||
|
||||
# Build the project
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
make -j$(nproc)
|
||||
|
||||
# Run tests and examples
|
||||
ctest --verbose
|
||||
./example/example
|
||||
```
|
||||
# vcpkg klonen & bootstrappen
|
||||
git clone https://github.com/microsoft/vcpkg.git "$HOME/vcpkg"
|
||||
"$HOME/vcpkg/bootstrap-vcpkg.sh" # Linux/macOS
|
||||
# Windows (PowerShell):
|
||||
# powershell -NoProfile -ExecutionPolicy Bypass -Command "& '$env:USERPROFILE\vcpkg\bootstrap-vcpkg.bat'"
|
||||
|
||||
# Konfigurieren
|
||||
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="$HOME/vcpkg/scripts/buildsystems/vcpkg.cmake"
|
||||
#### macOS - Build via scripts/build.sh
|
||||
```bash
|
||||
# Install dependencies via Homebrew
|
||||
brew install cmake cryptopp nlohmann-json curl
|
||||
|
||||
# Bauen
|
||||
cmake --build build --config Release
|
||||
|
||||
# Beispiel
|
||||
cmake -S example -B example/build -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build example/build --config Release
|
||||
# Requires: CMake, C++17 compiler, Homebrew packages
|
||||
chmod +x scripts/build.sh
|
||||
./scripts/build.sh
|
||||
```
|
||||
|
||||
#### Manual Build (All Platforms)
|
||||
```bash
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
cmake --build . --config Release
|
||||
```
|
||||
|
||||
**Note:** The manual build method requires you to have all dependencies properly configured. For most users, the platform-specific build scripts are recommended.
|
||||
|
||||
**Linux Compatibility:** The project has been tested and successfully builds on Fedora Linux with system packages. It automatically detects the platform and uses appropriate dependency resolution methods (vcpkg for Windows, system packages for Linux/macOS).
|
||||
|
||||
## Usage
|
||||
|
||||
### API Functions
|
||||
### Text Paste with Formatting
|
||||
|
||||
```cpp
|
||||
// Create a new paste
|
||||
int create_paste(const char* server_url, const char* content,
|
||||
const char* password, const char* expiration,
|
||||
const char* format, int burn_after_reading,
|
||||
int open_discussion, char** paste_url,
|
||||
char** delete_token);
|
||||
The library supports multiple text formats as defined in the [PrivateBin API v1.3](https://github.com/PrivateBin/PrivateBin/wiki/API):
|
||||
|
||||
// Retrieve a paste
|
||||
int get_paste(const char* server_url, const char* paste_id,
|
||||
const char* key, char** content);
|
||||
#### Available Formats
|
||||
|
||||
// Delete a paste
|
||||
int delete_paste(const char* server_url, const char* paste_id,
|
||||
const char* delete_token);
|
||||
- **`plaintext`** - Plain text (default)
|
||||
- **`syntaxhighlighting`** - Syntax highlighting for code
|
||||
- **`markdown`** - Markdown formatting
|
||||
|
||||
// Free memory allocated by the API functions
|
||||
void free_string(char* str);
|
||||
```
|
||||
#### Basic Example
|
||||
|
||||
### Example
|
||||
```c
|
||||
#include "libprivatebin.h"
|
||||
|
||||
```cpp
|
||||
#include "privatebinapi.h"
|
||||
#include <iostream>
|
||||
char* paste_url = nullptr;
|
||||
char* delete_token = nullptr;
|
||||
|
||||
int main() {
|
||||
char* paste_url = nullptr;
|
||||
char* delete_token = nullptr;
|
||||
|
||||
int result = create_paste(
|
||||
"https://privatebin.net",
|
||||
"Hello, PrivateBin!",
|
||||
nullptr, // No password
|
||||
"1hour", // Expire in 1 hour
|
||||
"plaintext", // Plain text format
|
||||
0, // Don't burn after reading
|
||||
0, // No discussion
|
||||
&paste_url,
|
||||
&delete_token
|
||||
);
|
||||
|
||||
if (result == 0) {
|
||||
std::cout << "Paste created: " << paste_url << std::endl;
|
||||
std::cout << "Delete token: " << delete_token << std::endl;
|
||||
|
||||
// Free allocated memory
|
||||
free_string(paste_url);
|
||||
free_string(delete_token);
|
||||
} else {
|
||||
std::cout << "Failed to create paste: " << result << std::endl;
|
||||
}
|
||||
|
||||
return 0;
|
||||
int result = create_paste(
|
||||
"https://privatebin.net",
|
||||
"Hello, World!",
|
||||
NULL, // no password
|
||||
"1day", // expiration
|
||||
"plaintext", // format
|
||||
0, // don't burn after reading
|
||||
0 // no discussion
|
||||
);
|
||||
|
||||
if (result == 0) {
|
||||
printf("Paste created: %s\n", paste_url);
|
||||
free_string(paste_url);
|
||||
free_string(delete_token);
|
||||
}
|
||||
```
|
||||
|
||||
## Error Codes
|
||||
#### Syntax Highlighting Example
|
||||
|
||||
- 0: Success
|
||||
- 1: Network error
|
||||
- 2: Encryption/decryption error
|
||||
- 3: Invalid input
|
||||
- 4: Server error
|
||||
- 5: JSON parsing error
|
||||
```c
|
||||
const char* code_content = R"(
|
||||
#include <iostream>
|
||||
|
||||
int main() {
|
||||
std::cout << "Hello, World!" << std::endl;
|
||||
return 0;
|
||||
}
|
||||
)";
|
||||
|
||||
int result = create_paste(
|
||||
"https://privatebin.net",
|
||||
code_content,
|
||||
NULL, // no password
|
||||
"1week", // expiration
|
||||
"syntaxhighlighting", // syntax highlighting format
|
||||
0, // don't burn after reading
|
||||
0 // no discussion
|
||||
);
|
||||
```
|
||||
|
||||
#### Markdown Example
|
||||
|
||||
```c
|
||||
const char* markdown_content = R"(
|
||||
# Header
|
||||
|
||||
This is **bold** and *italic* text.
|
||||
|
||||
## Code Block
|
||||
```cpp
|
||||
int x = 42;
|
||||
std::cout << x << std::endl;
|
||||
```
|
||||
|
||||
> This is a blockquote.
|
||||
)";
|
||||
|
||||
int result = create_paste(
|
||||
"https://privatebin.net",
|
||||
markdown_content,
|
||||
NULL, // no password
|
||||
"1month", // expiration
|
||||
"markdown", // markdown format
|
||||
0, // don't burn after reading
|
||||
0 // no discussion
|
||||
);
|
||||
```
|
||||
|
||||
### File Upload
|
||||
|
||||
```c
|
||||
char* paste_url = nullptr;
|
||||
char* delete_token = nullptr;
|
||||
|
||||
int result = upload_file(
|
||||
"https://privatebin.net",
|
||||
"/path/to/file.txt",
|
||||
"mypassword", // optional password
|
||||
"1week", // expiration
|
||||
0, // don't burn after reading
|
||||
0 // no discussion
|
||||
);
|
||||
|
||||
if (result == 0) {
|
||||
printf("Successfully uploaded!\n");
|
||||
printf("URL: %s\n", paste_url);
|
||||
printf("Delete Token: %s\n", delete_token);
|
||||
|
||||
// Free memory
|
||||
free_string(paste_url);
|
||||
free_string(delete_token);
|
||||
}
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
The library contains a comprehensive example program that demonstrates both text paste and file upload functionality:
|
||||
|
||||
### Running the Example
|
||||
|
||||
```bash
|
||||
# Run basic example (tests all text formats)
|
||||
./example
|
||||
|
||||
# Upload a file
|
||||
./example --upload https://privatebin.net test.txt
|
||||
|
||||
# Upload with password and expiration
|
||||
./example --upload https://privatebin.net test.txt mypassword 1week
|
||||
|
||||
# Upload with all options
|
||||
./example --upload https://privatebin.net test.txt mypassword 1day 1 0
|
||||
```
|
||||
|
||||
The basic example now demonstrates:
|
||||
- **Plaintext format** - Simple text pastes
|
||||
- **Syntax highlighting format** - Code with syntax highlighting
|
||||
- **Markdown format** - Rich text formatting
|
||||
- **Interactive format selection** - Shows available options
|
||||
|
||||
### Example Output
|
||||
|
||||
The example program demonstrates:
|
||||
- Creating text pastes
|
||||
- Retrieving paste content
|
||||
- Deleting pastes
|
||||
- File upload with various options
|
||||
- Error handling for all operations
|
||||
|
||||
## Testing
|
||||
|
||||
This project ships with both unit-style tests (no network required) and optional integration tests against a live PrivateBin server.
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- CMake 3.10+
|
||||
- A C++17 compiler
|
||||
- Dependencies (Windows via vcpkg; Linux/macOS via system packages as documented above)
|
||||
|
||||
### Build and run tests (MSVC on Windows)
|
||||
|
||||
```cmd
|
||||
REM From project root
|
||||
scripts\build_windows.bat
|
||||
|
||||
REM Run tests
|
||||
ctest -C Release --test-dir build --output-on-failure
|
||||
```
|
||||
|
||||
### Build and run tests with clang-cl + LLVM coverage (Windows)
|
||||
|
||||
If you want code coverage reports using LLVM tools:
|
||||
|
||||
1) Install LLVM (contains llvm-profdata and llvm-cov)
|
||||
- `winget install LLVM.LLVM` or use the official installer (ensure tools are in PATH)
|
||||
|
||||
2) Configure a separate clang-cl build with coverage enabled:
|
||||
|
||||
```cmd
|
||||
cmake -S . -B build-clang -G "Visual Studio 17 2022" -A x64 -T ClangCL ^
|
||||
-DCMAKE_TOOLCHAIN_FILE="%USERPROFILE%\vcpkg\scripts\buildsystems\vcpkg.cmake" ^
|
||||
-DVCPKG_TARGET_TRIPLET=x64-windows ^
|
||||
-DENABLE_LLVM_COVERAGE=ON ^
|
||||
-DLLVM_PROFDATA="C:/Program Files/LLVM/bin/llvm-profdata.exe" ^
|
||||
-DLLVM_COV="C:/Program Files/LLVM/bin/llvm-cov.exe"
|
||||
|
||||
cmake --build build-clang --config Release --target coverage_llvm
|
||||
```
|
||||
|
||||
3) Coverage outputs
|
||||
- Text report is printed in the build log
|
||||
- HTML report is written to `build-clang/coverage/html/`
|
||||
|
||||
Notes:
|
||||
- The coverage target runs the tests and then generates reports. It requires clang/clang-cl; MSVC alone is not supported for LLVM coverage instrumentation.
|
||||
- On Windows `|` must be escaped in regex arguments; the CMake configuration already handles this.
|
||||
|
||||
### Integration tests against a live server
|
||||
|
||||
By default the integration test is disabled. Enable it by setting an environment variable before running the tests. The default server used is `https://privatebin.medisoftware.org`.
|
||||
|
||||
```cmd
|
||||
REM Enable integration test and optionally override the server URL
|
||||
set PRIVATEBIN_IT=1
|
||||
set PRIVATEBIN_SERVER=https://privatebin.medisoftware.org/
|
||||
|
||||
ctest -C Release --test-dir build --output-on-failure
|
||||
```
|
||||
|
||||
What it does:
|
||||
- Creates a paste (three text formats: plaintext, syntax highlighting, markdown)
|
||||
- Retrieves the paste and validates content
|
||||
- Deletes the paste
|
||||
- Uploads a small file and performs the same roundtrip
|
||||
|
||||
Safety & disclaimers:
|
||||
- The referenced server is intended for testing and may be rate-limited or reset without notice. See its homepage for details: https://privatebin.medisoftware.org
|
||||
- Do not upload sensitive data to public test instances.
|
||||
|
||||
## API Reference
|
||||
|
||||
### Functions
|
||||
|
||||
- `create_paste()` - Creates a text paste with optional formatting
|
||||
- `upload_file()` - Uploads a file
|
||||
- `get_paste()` - Retrieves a paste
|
||||
- `delete_paste()` - Deletes a paste
|
||||
- `free_string()` - Frees memory
|
||||
|
||||
### Format Support
|
||||
|
||||
The `create_paste()` function supports the following formats as defined in the [PrivateBin API v1.3](https://github.com/PrivateBin/PrivateBin/wiki/API):
|
||||
|
||||
- **`plaintext`** - Default format for simple text
|
||||
- **`syntaxhighlighting`** - Syntax highlighting for code snippets
|
||||
- **`markdown`** - Markdown formatting for rich text
|
||||
|
||||
### Error Codes
|
||||
|
||||
- `0` - Success
|
||||
- `1` - Network error
|
||||
- `2` - Cryptographic error
|
||||
- `3` - Invalid input (e.g., file not found or too large)
|
||||
- `4` - Server error
|
||||
- `5` - JSON parsing error
|
||||
|
||||
## Security
|
||||
|
||||
- **Client-Side Encryption**: All data is encrypted before upload
|
||||
- **AES-256-GCM**: Modern encryption with authentication
|
||||
- **PBKDF2**: Secure key derivation with 100,000 iterations
|
||||
- **Random Keys**: Each paste receives a unique key
|
||||
- **No Server Logs**: Server cannot read encrypted data
|
||||
- **File Compression**: Automatic zlib compression before encryption
|
||||
- **Binary Support**: All file types are treated as encrypted binary data
|
||||
|
||||
## Limitations
|
||||
|
||||
- **File Size**: Maximum file size is 100MB
|
||||
- **File Type**: All file types are treated as binary data
|
||||
- **Server Compatibility**: Works with PrivateBin v1.3+ servers
|
||||
- **Format**: Files are always treated as "plaintext" (even if they are binary data)
|
||||
|
||||
## Error Handling
|
||||
|
||||
The library returns detailed error codes and logs errors to the console. Common errors:
|
||||
|
||||
- **File not found**: Check the file path
|
||||
- **File too large**: Reduce file size or split it up
|
||||
- **Network error**: Check server URL and internet connection
|
||||
- **Server error**: The server might be temporarily unavailable
|
||||
|
||||
## License
|
||||
|
||||
This project is licensed under the MIT License - see the LICENSE file for details.
|
||||
See [LICENSE](LICENSE) for details.
|
||||
|
||||
## Changelog
|
||||
|
||||
### v0.1.1.6 (2025-08-28)
|
||||
- **NEW**: Full Linux compatibility with system packages
|
||||
- **NEW**: Automatic platform detection (Windows: vcpkg, Linux: system packages)
|
||||
- **IMPROVED**: Enhanced Linux build documentation and instructions
|
||||
- **IMPROVED**: Better dependency management for cross-platform builds
|
||||
- **FIXED**: CMakeLists.txt now works on both Windows and Linux without manual configuration
|
||||
|
||||
### v0.1.1.5 (2025-08-28)
|
||||
- **NEW**: Enhanced text format support (plaintext, syntax highlighting, markdown)
|
||||
- **NEW**: Comprehensive format testing in examples and integration tests
|
||||
- **IMPROVED**: Better API documentation with format examples
|
||||
- **IMPROVED**: Enhanced test coverage for all supported formats
|
||||
|
||||
### v0.1.1.4 (2025-08-28)
|
||||
- **NEW**: Automated release creation script (`scripts/create_release.ps1`)
|
||||
- **NEW**: Build scripts moved to `scripts/` directory for better organization
|
||||
- **IMPROVED**: Enhanced build documentation with platform-specific instructions
|
||||
- **IMPROVED**: Better project structure and organization
|
||||
|
||||
### v0.1.1.1 (2025-08-28)
|
||||
- **NEW**: Combined example program with both text and file upload functionality
|
||||
- **IMPROVED**: Unified command-line interface for examples
|
||||
- **IMPROVED**: Better error handling and user experience
|
||||
|
||||
### v0.1.1 (2025-08-28)
|
||||
- **NEW**: File upload functionality added
|
||||
- **NEW**: `upload_file()` function implemented
|
||||
- **NEW**: Comprehensive example program
|
||||
- **NEW**: Extended documentation for file upload
|
||||
- **IMPROVED**: Better error handling
|
||||
- **IMPROVED**: Cross-platform compatibility
|
||||
193
build-clang/ALL_BUILD.vcxproj
Normal file
193
build-clang/ALL_BUILD.vcxproj
Normal file
File diff suppressed because one or more lines are too long
8
build-clang/ALL_BUILD.vcxproj.filters
Normal file
8
build-clang/ALL_BUILD.vcxproj.filters
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="17.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="C:\Users\mbusc\source\repos\privatebin-cpp\CMakeLists.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
8
build-clang/CTestTestfile.cmake
Normal file
8
build-clang/CTestTestfile.cmake
Normal file
@ -0,0 +1,8 @@
|
||||
# CMake generated Testfile for
|
||||
# Source directory: C:/Users/mbusc/source/repos/privatebin-cpp
|
||||
# Build directory: C:/Users/mbusc/source/repos/privatebin-cpp/build-clang
|
||||
#
|
||||
# This file includes the relevant testing commands required for
|
||||
# testing this directory and lists subdirectories to be tested as well.
|
||||
subdirs("tests")
|
||||
subdirs("example")
|
||||
240
build-clang/Continuous.vcxproj
Normal file
240
build-clang/Continuous.vcxproj
Normal file
File diff suppressed because one or more lines are too long
17
build-clang/Continuous.vcxproj.filters
Normal file
17
build-clang/Continuous.vcxproj.filters
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="17.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\CMakeFiles\57c6fe7b0978933c15bee3dfcb818447\Continuous.rule">
|
||||
<Filter>CMake Rules</Filter>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="C:\Users\mbusc\source\repos\privatebin-cpp\CMakeLists.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\CMakeFiles\Continuous" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="CMake Rules">
|
||||
<UniqueIdentifier>{A99DCD01-F97E-3DBB-AE0A-A36B621FE04A}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
109
build-clang/DartConfiguration.tcl
Normal file
109
build-clang/DartConfiguration.tcl
Normal file
@ -0,0 +1,109 @@
|
||||
# This file is configured by CMake automatically as DartConfiguration.tcl
|
||||
# If you choose not to use CMake, this file may be hand configured, by
|
||||
# filling in the required variables.
|
||||
|
||||
|
||||
# Configuration directories and files
|
||||
SourceDirectory: C:/Users/mbusc/source/repos/privatebin-cpp
|
||||
BuildDirectory: C:/Users/mbusc/source/repos/privatebin-cpp/build-clang
|
||||
|
||||
# Where to place the cost data store
|
||||
CostDataFile:
|
||||
|
||||
# Site is something like machine.domain, i.e. pragmatic.crd
|
||||
Site: master11
|
||||
|
||||
# Build name is osname-revision-compiler, i.e. Linux-2.4.2-2smp-c++
|
||||
BuildName: Win32-MSBuild
|
||||
|
||||
# Subprojects
|
||||
LabelsForSubprojects:
|
||||
|
||||
# Submission information
|
||||
SubmitURL: http://
|
||||
SubmitInactivityTimeout:
|
||||
|
||||
# Dashboard start time
|
||||
NightlyStartTime: 00:00:00 EDT
|
||||
|
||||
# Commands for the build/test/submit cycle
|
||||
ConfigureCommand: "C:/Program Files/CMake/bin/cmake.exe" "C:/Users/mbusc/source/repos/privatebin-cpp"
|
||||
MakeCommand: "C:\Program Files\CMake\bin\cmake.exe" --build . --config "${CTEST_CONFIGURATION_TYPE}"
|
||||
DefaultCTestConfigurationType: Release
|
||||
|
||||
# version control
|
||||
UpdateVersionOnly:
|
||||
|
||||
# CVS options
|
||||
# Default is "-d -P -A"
|
||||
CVSCommand:
|
||||
CVSUpdateOptions:
|
||||
|
||||
# Subversion options
|
||||
SVNCommand:
|
||||
SVNOptions:
|
||||
SVNUpdateOptions:
|
||||
|
||||
# Git options
|
||||
GITCommand: C:/Program Files/Git/cmd/git.exe
|
||||
GITInitSubmodules:
|
||||
GITUpdateOptions:
|
||||
GITUpdateCustom:
|
||||
|
||||
# Perforce options
|
||||
P4Command:
|
||||
P4Client:
|
||||
P4Options:
|
||||
P4UpdateOptions:
|
||||
P4UpdateCustom:
|
||||
|
||||
# Generic update command
|
||||
UpdateCommand: C:/Program Files/Git/cmd/git.exe
|
||||
UpdateOptions:
|
||||
UpdateType: git
|
||||
|
||||
# Compiler info
|
||||
Compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/Llvm/x64/bin/clang-cl.exe
|
||||
CompilerVersion: 19.1.5
|
||||
|
||||
# Dynamic analysis (MemCheck)
|
||||
PurifyCommand:
|
||||
ValgrindCommand:
|
||||
ValgrindCommandOptions:
|
||||
DrMemoryCommand:
|
||||
DrMemoryCommandOptions:
|
||||
CudaSanitizerCommand:
|
||||
CudaSanitizerCommandOptions:
|
||||
MemoryCheckType:
|
||||
MemoryCheckSanitizerOptions:
|
||||
MemoryCheckCommand: MEMORYCHECK_COMMAND-NOTFOUND
|
||||
MemoryCheckCommandOptions:
|
||||
MemoryCheckSuppressionFile:
|
||||
|
||||
# Coverage
|
||||
CoverageCommand: COVERAGE_COMMAND-NOTFOUND
|
||||
CoverageExtraFlags: -l
|
||||
|
||||
# Testing options
|
||||
# TimeOut is the amount of time in seconds to wait for processes
|
||||
# to complete during testing. After TimeOut seconds, the
|
||||
# process will be summarily terminated.
|
||||
# Currently set to 25 minutes
|
||||
TimeOut: 1500
|
||||
|
||||
# During parallel testing CTest will not start a new test if doing
|
||||
# so would cause the system load to exceed this value.
|
||||
TestLoad:
|
||||
|
||||
TLSVerify:
|
||||
TLSVersion:
|
||||
|
||||
UseLaunchers: 0
|
||||
CurlOptions:
|
||||
# warning, if you add new options here that have to do with submit,
|
||||
# you have to update cmCTestSubmitCommand.cxx
|
||||
|
||||
# For CTest submissions that timeout, these options
|
||||
# specify behavior for retrying the submission
|
||||
CTestSubmitRetryDelay: 5
|
||||
CTestSubmitRetryCount: 3
|
||||
240
build-clang/Experimental.vcxproj
Normal file
240
build-clang/Experimental.vcxproj
Normal file
File diff suppressed because one or more lines are too long
17
build-clang/Experimental.vcxproj.filters
Normal file
17
build-clang/Experimental.vcxproj.filters
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="17.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\CMakeFiles\57c6fe7b0978933c15bee3dfcb818447\Experimental.rule">
|
||||
<Filter>CMake Rules</Filter>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="C:\Users\mbusc\source\repos\privatebin-cpp\CMakeLists.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\CMakeFiles\Experimental" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="CMake Rules">
|
||||
<UniqueIdentifier>{A99DCD01-F97E-3DBB-AE0A-A36B621FE04A}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
209
build-clang/INSTALL.vcxproj
Normal file
209
build-clang/INSTALL.vcxproj
Normal file
@ -0,0 +1,209 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="17.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="MinSizeRel|x64">
|
||||
<Configuration>MinSizeRel</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="RelWithDebInfo|x64">
|
||||
<Configuration>RelWithDebInfo</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{9CA73C8F-0AB5-34C6-92C0-0C6A30C28CE5}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<WindowsTargetPlatformVersion>10.0.26100.0</WindowsTargetPlatformVersion>
|
||||
<Platform>x64</Platform>
|
||||
<ProjectName>INSTALL</ProjectName>
|
||||
<VCProjectUpgraderObjectName>NoUpgrade</VCProjectUpgraderObjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Utility</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>ClangCL</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Utility</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>ClangCL</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'" Label="Configuration">
|
||||
<ConfigurationType>Utility</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>ClangCL</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'" Label="Configuration">
|
||||
<ConfigurationType>Utility</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>ClangCL</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.20506.1</_ProjectFileVersion>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<PostBuildEvent>
|
||||
<UseUtf8Encoding>Always</UseUtf8Encoding>
|
||||
<Message></Message>
|
||||
<Command>setlocal
|
||||
"C:\Program Files\CMake\bin\cmake.exe" -DBUILD_TYPE=$(Configuration) -P cmake_install.cmake
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<PostBuildEvent>
|
||||
<UseUtf8Encoding>Always</UseUtf8Encoding>
|
||||
<Message></Message>
|
||||
<Command>setlocal
|
||||
"C:\Program Files\CMake\bin\cmake.exe" -DBUILD_TYPE=$(Configuration) -P cmake_install.cmake
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">
|
||||
<PostBuildEvent>
|
||||
<UseUtf8Encoding>Always</UseUtf8Encoding>
|
||||
<Message></Message>
|
||||
<Command>setlocal
|
||||
"C:\Program Files\CMake\bin\cmake.exe" -DBUILD_TYPE=$(Configuration) -P cmake_install.cmake
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">
|
||||
<PostBuildEvent>
|
||||
<UseUtf8Encoding>Always</UseUtf8Encoding>
|
||||
<Message></Message>
|
||||
<Command>setlocal
|
||||
"C:\Program Files\CMake\bin\cmake.exe" -DBUILD_TYPE=$(Configuration) -P cmake_install.cmake
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\CMakeFiles\57c6fe7b0978933c15bee3dfcb818447\INSTALL_force.rule">
|
||||
<BuildInParallel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</BuildInParallel>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> </Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">setlocal
|
||||
cd .
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\CMakeFiles\INSTALL_force</Outputs>
|
||||
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkObjects>
|
||||
<VerifyInputsAndOutputsExist Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</VerifyInputsAndOutputsExist>
|
||||
<BuildInParallel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</BuildInParallel>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> </Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">setlocal
|
||||
cd .
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\CMakeFiles\INSTALL_force</Outputs>
|
||||
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkObjects>
|
||||
<VerifyInputsAndOutputsExist Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</VerifyInputsAndOutputsExist>
|
||||
<BuildInParallel Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">true</BuildInParallel>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'"> </Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">setlocal
|
||||
cd .
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\CMakeFiles\INSTALL_force</Outputs>
|
||||
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">false</LinkObjects>
|
||||
<VerifyInputsAndOutputsExist Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">false</VerifyInputsAndOutputsExist>
|
||||
<BuildInParallel Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">true</BuildInParallel>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'"> </Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">setlocal
|
||||
cd .
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\CMakeFiles\INSTALL_force</Outputs>
|
||||
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">false</LinkObjects>
|
||||
<VerifyInputsAndOutputsExist Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">false</VerifyInputsAndOutputsExist>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\ZERO_CHECK.vcxproj">
|
||||
<Project>{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}</Project>
|
||||
<Name>ZERO_CHECK</Name>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\ALL_BUILD.vcxproj">
|
||||
<Project>{A12920FA-3DF1-3286-B224-DA3DB7CD3B92}</Project>
|
||||
<Name>ALL_BUILD</Name>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
13
build-clang/INSTALL.vcxproj.filters
Normal file
13
build-clang/INSTALL.vcxproj.filters
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="17.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\CMakeFiles\57c6fe7b0978933c15bee3dfcb818447\INSTALL_force.rule">
|
||||
<Filter>CMake Rules</Filter>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="CMake Rules">
|
||||
<UniqueIdentifier>{A99DCD01-F97E-3DBB-AE0A-A36B621FE04A}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
152
build-clang/LibPrivateBin.sln
Normal file
152
build-clang/LibPrivateBin.sln
Normal file
@ -0,0 +1,152 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ALL_BUILD", "ALL_BUILD.vcxproj", "{A12920FA-3DF1-3286-B224-DA3DB7CD3B92}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF} = {0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}
|
||||
{F380F865-A305-3E4D-8D5B-FB8D33192EC2} = {F380F865-A305-3E4D-8D5B-FB8D33192EC2}
|
||||
{F7375EBF-3777-35B1-B163-0BF71FADB554} = {F7375EBF-3777-35B1-B163-0BF71FADB554}
|
||||
{C3F88C47-123F-3064-9A29-E5E341930946} = {C3F88C47-123F-3064-9A29-E5E341930946}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Continuous", "Continuous.vcxproj", "{03609199-09CA-3019-BCB6-DA7E58A43AEE}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF} = {0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Experimental", "Experimental.vcxproj", "{123F950F-7A27-3481-93AD-4768E07EC701}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF} = {0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "INSTALL", "INSTALL.vcxproj", "{9CA73C8F-0AB5-34C6-92C0-0C6A30C28CE5}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{A12920FA-3DF1-3286-B224-DA3DB7CD3B92} = {A12920FA-3DF1-3286-B224-DA3DB7CD3B92}
|
||||
{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF} = {0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Nightly", "Nightly.vcxproj", "{CDD71547-CEB0-3705-8474-F483B276F2DC}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF} = {0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NightlyMemoryCheck", "NightlyMemoryCheck.vcxproj", "{4A8DB334-A245-36F1-90F8-68F79015737C}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF} = {0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RUN_TESTS", "RUN_TESTS.vcxproj", "{6B00B4B4-FA49-3C0E-9E2B-A30BDF389AE5}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF} = {0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZERO_CHECK", "ZERO_CHECK.vcxproj", "{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "coverage_llvm", "coverage_llvm.vcxproj", "{DAB46045-C08F-3736-8C3A-C8BB835BF456}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF} = {0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}
|
||||
{F7375EBF-3777-35B1-B163-0BF71FADB554} = {F7375EBF-3777-35B1-B163-0BF71FADB554}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example", "example\example.vcxproj", "{F380F865-A305-3E4D-8D5B-FB8D33192EC2}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF} = {0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}
|
||||
{F7375EBF-3777-35B1-B163-0BF71FADB554} = {F7375EBF-3777-35B1-B163-0BF71FADB554}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libprivatebin", "libprivatebin.vcxproj", "{F7375EBF-3777-35B1-B163-0BF71FADB554}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF} = {0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_basic", "tests\test_basic.vcxproj", "{C3F88C47-123F-3064-9A29-E5E341930946}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF} = {0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}
|
||||
{F7375EBF-3777-35B1-B163-0BF71FADB554} = {F7375EBF-3777-35B1-B163-0BF71FADB554}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
Release|x64 = Release|x64
|
||||
MinSizeRel|x64 = MinSizeRel|x64
|
||||
RelWithDebInfo|x64 = RelWithDebInfo|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{A12920FA-3DF1-3286-B224-DA3DB7CD3B92}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{A12920FA-3DF1-3286-B224-DA3DB7CD3B92}.Debug|x64.Build.0 = Debug|x64
|
||||
{A12920FA-3DF1-3286-B224-DA3DB7CD3B92}.Release|x64.ActiveCfg = Release|x64
|
||||
{A12920FA-3DF1-3286-B224-DA3DB7CD3B92}.Release|x64.Build.0 = Release|x64
|
||||
{A12920FA-3DF1-3286-B224-DA3DB7CD3B92}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64
|
||||
{A12920FA-3DF1-3286-B224-DA3DB7CD3B92}.MinSizeRel|x64.Build.0 = MinSizeRel|x64
|
||||
{A12920FA-3DF1-3286-B224-DA3DB7CD3B92}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
|
||||
{A12920FA-3DF1-3286-B224-DA3DB7CD3B92}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
|
||||
{03609199-09CA-3019-BCB6-DA7E58A43AEE}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{03609199-09CA-3019-BCB6-DA7E58A43AEE}.Release|x64.ActiveCfg = Release|x64
|
||||
{03609199-09CA-3019-BCB6-DA7E58A43AEE}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64
|
||||
{03609199-09CA-3019-BCB6-DA7E58A43AEE}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
|
||||
{123F950F-7A27-3481-93AD-4768E07EC701}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{123F950F-7A27-3481-93AD-4768E07EC701}.Release|x64.ActiveCfg = Release|x64
|
||||
{123F950F-7A27-3481-93AD-4768E07EC701}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64
|
||||
{123F950F-7A27-3481-93AD-4768E07EC701}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
|
||||
{9CA73C8F-0AB5-34C6-92C0-0C6A30C28CE5}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{9CA73C8F-0AB5-34C6-92C0-0C6A30C28CE5}.Release|x64.ActiveCfg = Release|x64
|
||||
{9CA73C8F-0AB5-34C6-92C0-0C6A30C28CE5}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64
|
||||
{9CA73C8F-0AB5-34C6-92C0-0C6A30C28CE5}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
|
||||
{CDD71547-CEB0-3705-8474-F483B276F2DC}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{CDD71547-CEB0-3705-8474-F483B276F2DC}.Release|x64.ActiveCfg = Release|x64
|
||||
{CDD71547-CEB0-3705-8474-F483B276F2DC}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64
|
||||
{CDD71547-CEB0-3705-8474-F483B276F2DC}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
|
||||
{4A8DB334-A245-36F1-90F8-68F79015737C}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{4A8DB334-A245-36F1-90F8-68F79015737C}.Release|x64.ActiveCfg = Release|x64
|
||||
{4A8DB334-A245-36F1-90F8-68F79015737C}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64
|
||||
{4A8DB334-A245-36F1-90F8-68F79015737C}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
|
||||
{6B00B4B4-FA49-3C0E-9E2B-A30BDF389AE5}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{6B00B4B4-FA49-3C0E-9E2B-A30BDF389AE5}.Release|x64.ActiveCfg = Release|x64
|
||||
{6B00B4B4-FA49-3C0E-9E2B-A30BDF389AE5}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64
|
||||
{6B00B4B4-FA49-3C0E-9E2B-A30BDF389AE5}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
|
||||
{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}.Debug|x64.Build.0 = Debug|x64
|
||||
{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}.Release|x64.ActiveCfg = Release|x64
|
||||
{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}.Release|x64.Build.0 = Release|x64
|
||||
{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64
|
||||
{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}.MinSizeRel|x64.Build.0 = MinSizeRel|x64
|
||||
{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
|
||||
{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
|
||||
{DAB46045-C08F-3736-8C3A-C8BB835BF456}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{DAB46045-C08F-3736-8C3A-C8BB835BF456}.Release|x64.ActiveCfg = Release|x64
|
||||
{DAB46045-C08F-3736-8C3A-C8BB835BF456}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64
|
||||
{DAB46045-C08F-3736-8C3A-C8BB835BF456}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
|
||||
{F380F865-A305-3E4D-8D5B-FB8D33192EC2}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{F380F865-A305-3E4D-8D5B-FB8D33192EC2}.Debug|x64.Build.0 = Debug|x64
|
||||
{F380F865-A305-3E4D-8D5B-FB8D33192EC2}.Release|x64.ActiveCfg = Release|x64
|
||||
{F380F865-A305-3E4D-8D5B-FB8D33192EC2}.Release|x64.Build.0 = Release|x64
|
||||
{F380F865-A305-3E4D-8D5B-FB8D33192EC2}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64
|
||||
{F380F865-A305-3E4D-8D5B-FB8D33192EC2}.MinSizeRel|x64.Build.0 = MinSizeRel|x64
|
||||
{F380F865-A305-3E4D-8D5B-FB8D33192EC2}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
|
||||
{F380F865-A305-3E4D-8D5B-FB8D33192EC2}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
|
||||
{F7375EBF-3777-35B1-B163-0BF71FADB554}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{F7375EBF-3777-35B1-B163-0BF71FADB554}.Debug|x64.Build.0 = Debug|x64
|
||||
{F7375EBF-3777-35B1-B163-0BF71FADB554}.Release|x64.ActiveCfg = Release|x64
|
||||
{F7375EBF-3777-35B1-B163-0BF71FADB554}.Release|x64.Build.0 = Release|x64
|
||||
{F7375EBF-3777-35B1-B163-0BF71FADB554}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64
|
||||
{F7375EBF-3777-35B1-B163-0BF71FADB554}.MinSizeRel|x64.Build.0 = MinSizeRel|x64
|
||||
{F7375EBF-3777-35B1-B163-0BF71FADB554}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
|
||||
{F7375EBF-3777-35B1-B163-0BF71FADB554}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
|
||||
{C3F88C47-123F-3064-9A29-E5E341930946}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{C3F88C47-123F-3064-9A29-E5E341930946}.Debug|x64.Build.0 = Debug|x64
|
||||
{C3F88C47-123F-3064-9A29-E5E341930946}.Release|x64.ActiveCfg = Release|x64
|
||||
{C3F88C47-123F-3064-9A29-E5E341930946}.Release|x64.Build.0 = Release|x64
|
||||
{C3F88C47-123F-3064-9A29-E5E341930946}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64
|
||||
{C3F88C47-123F-3064-9A29-E5E341930946}.MinSizeRel|x64.Build.0 = MinSizeRel|x64
|
||||
{C3F88C47-123F-3064-9A29-E5E341930946}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
|
||||
{C3F88C47-123F-3064-9A29-E5E341930946}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {F14B2BBB-D8DD-3B06-82A5-17652260B5B2}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityAddIns) = postSolution
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
240
build-clang/Nightly.vcxproj
Normal file
240
build-clang/Nightly.vcxproj
Normal file
File diff suppressed because one or more lines are too long
17
build-clang/Nightly.vcxproj.filters
Normal file
17
build-clang/Nightly.vcxproj.filters
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="17.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\CMakeFiles\57c6fe7b0978933c15bee3dfcb818447\Nightly.rule">
|
||||
<Filter>CMake Rules</Filter>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="C:\Users\mbusc\source\repos\privatebin-cpp\CMakeLists.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\CMakeFiles\Nightly" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="CMake Rules">
|
||||
<UniqueIdentifier>{A99DCD01-F97E-3DBB-AE0A-A36B621FE04A}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
240
build-clang/NightlyMemoryCheck.vcxproj
Normal file
240
build-clang/NightlyMemoryCheck.vcxproj
Normal file
File diff suppressed because one or more lines are too long
17
build-clang/NightlyMemoryCheck.vcxproj.filters
Normal file
17
build-clang/NightlyMemoryCheck.vcxproj.filters
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="17.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\CMakeFiles\57c6fe7b0978933c15bee3dfcb818447\NightlyMemoryCheck.rule">
|
||||
<Filter>CMake Rules</Filter>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="C:\Users\mbusc\source\repos\privatebin-cpp\CMakeLists.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\CMakeFiles\NightlyMemoryCheck" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="CMake Rules">
|
||||
<UniqueIdentifier>{A99DCD01-F97E-3DBB-AE0A-A36B621FE04A}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
199
build-clang/RUN_TESTS.vcxproj
Normal file
199
build-clang/RUN_TESTS.vcxproj
Normal file
@ -0,0 +1,199 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="17.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="MinSizeRel|x64">
|
||||
<Configuration>MinSizeRel</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="RelWithDebInfo|x64">
|
||||
<Configuration>RelWithDebInfo</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{6B00B4B4-FA49-3C0E-9E2B-A30BDF389AE5}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<WindowsTargetPlatformVersion>10.0.26100.0</WindowsTargetPlatformVersion>
|
||||
<Platform>x64</Platform>
|
||||
<ProjectName>RUN_TESTS</ProjectName>
|
||||
<VCProjectUpgraderObjectName>NoUpgrade</VCProjectUpgraderObjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Utility</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>ClangCL</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Utility</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>ClangCL</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'" Label="Configuration">
|
||||
<ConfigurationType>Utility</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>ClangCL</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'" Label="Configuration">
|
||||
<ConfigurationType>Utility</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>ClangCL</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.20506.1</_ProjectFileVersion>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<PostBuildEvent>
|
||||
<Message></Message>
|
||||
<Command>setlocal
|
||||
"C:\Program Files\CMake\bin\ctest.exe" -C $(Configuration)
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<PostBuildEvent>
|
||||
<Message></Message>
|
||||
<Command>setlocal
|
||||
"C:\Program Files\CMake\bin\ctest.exe" -C $(Configuration)
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">
|
||||
<PostBuildEvent>
|
||||
<Message></Message>
|
||||
<Command>setlocal
|
||||
"C:\Program Files\CMake\bin\ctest.exe" -C $(Configuration)
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">
|
||||
<PostBuildEvent>
|
||||
<Message></Message>
|
||||
<Command>setlocal
|
||||
"C:\Program Files\CMake\bin\ctest.exe" -C $(Configuration)
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\CMakeFiles\57c6fe7b0978933c15bee3dfcb818447\RUN_TESTS_force.rule">
|
||||
<BuildInParallel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</BuildInParallel>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> </Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">setlocal
|
||||
cd .
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\CMakeFiles\RUN_TESTS_force</Outputs>
|
||||
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkObjects>
|
||||
<VerifyInputsAndOutputsExist Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</VerifyInputsAndOutputsExist>
|
||||
<BuildInParallel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</BuildInParallel>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> </Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">setlocal
|
||||
cd .
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\CMakeFiles\RUN_TESTS_force</Outputs>
|
||||
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkObjects>
|
||||
<VerifyInputsAndOutputsExist Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</VerifyInputsAndOutputsExist>
|
||||
<BuildInParallel Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">true</BuildInParallel>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'"> </Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">setlocal
|
||||
cd .
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\CMakeFiles\RUN_TESTS_force</Outputs>
|
||||
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">false</LinkObjects>
|
||||
<VerifyInputsAndOutputsExist Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">false</VerifyInputsAndOutputsExist>
|
||||
<BuildInParallel Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">true</BuildInParallel>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'"> </Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">setlocal
|
||||
cd .
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\CMakeFiles\RUN_TESTS_force</Outputs>
|
||||
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">false</LinkObjects>
|
||||
<VerifyInputsAndOutputsExist Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">false</VerifyInputsAndOutputsExist>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\ZERO_CHECK.vcxproj">
|
||||
<Project>{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}</Project>
|
||||
<Name>ZERO_CHECK</Name>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
13
build-clang/RUN_TESTS.vcxproj.filters
Normal file
13
build-clang/RUN_TESTS.vcxproj.filters
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="17.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\CMakeFiles\57c6fe7b0978933c15bee3dfcb818447\RUN_TESTS_force.rule">
|
||||
<Filter>CMake Rules</Filter>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="CMake Rules">
|
||||
<UniqueIdentifier>{A99DCD01-F97E-3DBB-AE0A-A36B621FE04A}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
4
build-clang/Testing/Temporary/CTestCostData.txt
Normal file
4
build-clang/Testing/Temporary/CTestCostData.txt
Normal file
@ -0,0 +1,4 @@
|
||||
test_basic 0 0
|
||||
example_run 0 0
|
||||
---
|
||||
test_basic
|
||||
179
build-clang/ZERO_CHECK.vcxproj
Normal file
179
build-clang/ZERO_CHECK.vcxproj
Normal file
File diff suppressed because one or more lines are too long
13
build-clang/ZERO_CHECK.vcxproj.filters
Normal file
13
build-clang/ZERO_CHECK.vcxproj.filters
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="17.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\CMakeFiles\57c6fe7b0978933c15bee3dfcb818447\generate.stamp.rule">
|
||||
<Filter>CMake Rules</Filter>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="CMake Rules">
|
||||
<UniqueIdentifier>{A99DCD01-F97E-3DBB-AE0A-A36B621FE04A}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
292
build-clang/coverage_llvm.vcxproj
Normal file
292
build-clang/coverage_llvm.vcxproj
Normal file
File diff suppressed because one or more lines are too long
17
build-clang/coverage_llvm.vcxproj.filters
Normal file
17
build-clang/coverage_llvm.vcxproj.filters
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="17.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\CMakeFiles\57c6fe7b0978933c15bee3dfcb818447\coverage_llvm.rule">
|
||||
<Filter>CMake Rules</Filter>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="C:\Users\mbusc\source\repos\privatebin-cpp\CMakeLists.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\CMakeFiles\coverage_llvm" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="CMake Rules">
|
||||
<UniqueIdentifier>{A99DCD01-F97E-3DBB-AE0A-A36B621FE04A}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
185
build-clang/example/ALL_BUILD.vcxproj
Normal file
185
build-clang/example/ALL_BUILD.vcxproj
Normal file
@ -0,0 +1,185 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="17.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ResolveNugetPackages>false</ResolveNugetPackages>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="MinSizeRel|x64">
|
||||
<Configuration>MinSizeRel</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="RelWithDebInfo|x64">
|
||||
<Configuration>RelWithDebInfo</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{A12920FA-3DF1-3286-B224-DA3DB7CD3B92}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<WindowsTargetPlatformVersion>10.0.26100.0</WindowsTargetPlatformVersion>
|
||||
<Platform>x64</Platform>
|
||||
<ProjectName>ALL_BUILD</ProjectName>
|
||||
<VCProjectUpgraderObjectName>NoUpgrade</VCProjectUpgraderObjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Utility</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>ClangCL</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Utility</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>ClangCL</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'" Label="Configuration">
|
||||
<ConfigurationType>Utility</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>ClangCL</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'" Label="Configuration">
|
||||
<ConfigurationType>Utility</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>ClangCL</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.20506.1</_ProjectFileVersion>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Midl>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<OutputDirectory>$(ProjectDir)/$(IntDir)</OutputDirectory>
|
||||
<HeaderFileName>%(Filename).h</HeaderFileName>
|
||||
<TypeLibraryName>%(Filename).tlb</TypeLibraryName>
|
||||
<InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
|
||||
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
|
||||
</Midl>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Midl>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<OutputDirectory>$(ProjectDir)/$(IntDir)</OutputDirectory>
|
||||
<HeaderFileName>%(Filename).h</HeaderFileName>
|
||||
<TypeLibraryName>%(Filename).tlb</TypeLibraryName>
|
||||
<InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
|
||||
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
|
||||
</Midl>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">
|
||||
<Midl>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<OutputDirectory>$(ProjectDir)/$(IntDir)</OutputDirectory>
|
||||
<HeaderFileName>%(Filename).h</HeaderFileName>
|
||||
<TypeLibraryName>%(Filename).tlb</TypeLibraryName>
|
||||
<InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
|
||||
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
|
||||
</Midl>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">
|
||||
<Midl>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<OutputDirectory>$(ProjectDir)/$(IntDir)</OutputDirectory>
|
||||
<HeaderFileName>%(Filename).h</HeaderFileName>
|
||||
<TypeLibraryName>%(Filename).tlb</TypeLibraryName>
|
||||
<InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
|
||||
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
|
||||
</Midl>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="C:\Users\mbusc\source\repos\privatebin-cpp\example\CMakeLists.txt">
|
||||
<UseUtf8Encoding>Always</UseUtf8Encoding>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Building Custom Rule C:/Users/mbusc/source/repos/privatebin-cpp/example/CMakeLists.txt</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">setlocal
|
||||
"C:\Program Files\CMake\bin\cmake.exe" -SC:/Users/mbusc/source/repos/privatebin-cpp -BC:/Users/mbusc/source/repos/privatebin-cpp/build-clang --check-stamp-file C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/example/CMakeFiles/generate.stamp
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\example\CMakeFiles\generate.stamp</Outputs>
|
||||
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkObjects>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Building Custom Rule C:/Users/mbusc/source/repos/privatebin-cpp/example/CMakeLists.txt</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">setlocal
|
||||
"C:\Program Files\CMake\bin\cmake.exe" -SC:/Users/mbusc/source/repos/privatebin-cpp -BC:/Users/mbusc/source/repos/privatebin-cpp/build-clang --check-stamp-file C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/example/CMakeFiles/generate.stamp
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\example\CMakeFiles\generate.stamp</Outputs>
|
||||
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkObjects>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">Building Custom Rule C:/Users/mbusc/source/repos/privatebin-cpp/example/CMakeLists.txt</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">setlocal
|
||||
"C:\Program Files\CMake\bin\cmake.exe" -SC:/Users/mbusc/source/repos/privatebin-cpp -BC:/Users/mbusc/source/repos/privatebin-cpp/build-clang --check-stamp-file C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/example/CMakeFiles/generate.stamp
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\example\CMakeFiles\generate.stamp</Outputs>
|
||||
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">false</LinkObjects>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">Building Custom Rule C:/Users/mbusc/source/repos/privatebin-cpp/example/CMakeLists.txt</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">setlocal
|
||||
"C:\Program Files\CMake\bin\cmake.exe" -SC:/Users/mbusc/source/repos/privatebin-cpp -BC:/Users/mbusc/source/repos/privatebin-cpp/build-clang --check-stamp-file C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/example/CMakeFiles/generate.stamp
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\example\CMakeFiles\generate.stamp</Outputs>
|
||||
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">false</LinkObjects>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\ZERO_CHECK.vcxproj">
|
||||
<Project>{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}</Project>
|
||||
<Name>ZERO_CHECK</Name>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\example\example.vcxproj">
|
||||
<Project>{F380F865-A305-3E4D-8D5B-FB8D33192EC2}</Project>
|
||||
<Name>example</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
8
build-clang/example/ALL_BUILD.vcxproj.filters
Normal file
8
build-clang/example/ALL_BUILD.vcxproj.filters
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="17.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="C:\Users\mbusc\source\repos\privatebin-cpp\example\CMakeLists.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
6
build-clang/example/CTestTestfile.cmake
Normal file
6
build-clang/example/CTestTestfile.cmake
Normal file
@ -0,0 +1,6 @@
|
||||
# CMake generated Testfile for
|
||||
# Source directory: C:/Users/mbusc/source/repos/privatebin-cpp/example
|
||||
# Build directory: C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/example
|
||||
#
|
||||
# This file includes the relevant testing commands required for
|
||||
# testing this directory and lists subdirectories to be tested as well.
|
||||
209
build-clang/example/INSTALL.vcxproj
Normal file
209
build-clang/example/INSTALL.vcxproj
Normal file
@ -0,0 +1,209 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="17.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="MinSizeRel|x64">
|
||||
<Configuration>MinSizeRel</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="RelWithDebInfo|x64">
|
||||
<Configuration>RelWithDebInfo</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{9CA73C8F-0AB5-34C6-92C0-0C6A30C28CE5}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<WindowsTargetPlatformVersion>10.0.26100.0</WindowsTargetPlatformVersion>
|
||||
<Platform>x64</Platform>
|
||||
<ProjectName>INSTALL</ProjectName>
|
||||
<VCProjectUpgraderObjectName>NoUpgrade</VCProjectUpgraderObjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Utility</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>ClangCL</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Utility</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>ClangCL</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'" Label="Configuration">
|
||||
<ConfigurationType>Utility</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>ClangCL</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'" Label="Configuration">
|
||||
<ConfigurationType>Utility</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>ClangCL</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.20506.1</_ProjectFileVersion>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<PostBuildEvent>
|
||||
<UseUtf8Encoding>Always</UseUtf8Encoding>
|
||||
<Message></Message>
|
||||
<Command>setlocal
|
||||
"C:\Program Files\CMake\bin\cmake.exe" -DBUILD_TYPE=$(Configuration) -P cmake_install.cmake
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<PostBuildEvent>
|
||||
<UseUtf8Encoding>Always</UseUtf8Encoding>
|
||||
<Message></Message>
|
||||
<Command>setlocal
|
||||
"C:\Program Files\CMake\bin\cmake.exe" -DBUILD_TYPE=$(Configuration) -P cmake_install.cmake
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">
|
||||
<PostBuildEvent>
|
||||
<UseUtf8Encoding>Always</UseUtf8Encoding>
|
||||
<Message></Message>
|
||||
<Command>setlocal
|
||||
"C:\Program Files\CMake\bin\cmake.exe" -DBUILD_TYPE=$(Configuration) -P cmake_install.cmake
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">
|
||||
<PostBuildEvent>
|
||||
<UseUtf8Encoding>Always</UseUtf8Encoding>
|
||||
<Message></Message>
|
||||
<Command>setlocal
|
||||
"C:\Program Files\CMake\bin\cmake.exe" -DBUILD_TYPE=$(Configuration) -P cmake_install.cmake
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\CMakeFiles\f2daeb6d621bc9618657215c9680fc11\INSTALL_force.rule">
|
||||
<BuildInParallel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</BuildInParallel>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> </Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">setlocal
|
||||
cd .
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\example\CMakeFiles\INSTALL_force</Outputs>
|
||||
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkObjects>
|
||||
<VerifyInputsAndOutputsExist Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</VerifyInputsAndOutputsExist>
|
||||
<BuildInParallel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</BuildInParallel>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> </Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">setlocal
|
||||
cd .
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\example\CMakeFiles\INSTALL_force</Outputs>
|
||||
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkObjects>
|
||||
<VerifyInputsAndOutputsExist Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</VerifyInputsAndOutputsExist>
|
||||
<BuildInParallel Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">true</BuildInParallel>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'"> </Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">setlocal
|
||||
cd .
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\example\CMakeFiles\INSTALL_force</Outputs>
|
||||
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">false</LinkObjects>
|
||||
<VerifyInputsAndOutputsExist Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">false</VerifyInputsAndOutputsExist>
|
||||
<BuildInParallel Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">true</BuildInParallel>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'"> </Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">setlocal
|
||||
cd .
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\example\CMakeFiles\INSTALL_force</Outputs>
|
||||
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">false</LinkObjects>
|
||||
<VerifyInputsAndOutputsExist Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">false</VerifyInputsAndOutputsExist>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\ZERO_CHECK.vcxproj">
|
||||
<Project>{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}</Project>
|
||||
<Name>ZERO_CHECK</Name>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\example\ALL_BUILD.vcxproj">
|
||||
<Project>{A12920FA-3DF1-3286-B224-DA3DB7CD3B92}</Project>
|
||||
<Name>ALL_BUILD</Name>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
13
build-clang/example/INSTALL.vcxproj.filters
Normal file
13
build-clang/example/INSTALL.vcxproj.filters
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="17.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\CMakeFiles\f2daeb6d621bc9618657215c9680fc11\INSTALL_force.rule">
|
||||
<Filter>CMake Rules</Filter>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="CMake Rules">
|
||||
<UniqueIdentifier>{A99DCD01-F97E-3DBB-AE0A-A36B621FE04A}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
90
build-clang/example/LibPrivateBinExample.sln
Normal file
90
build-clang/example/LibPrivateBinExample.sln
Normal file
@ -0,0 +1,90 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ALL_BUILD", "ALL_BUILD.vcxproj", "{A12920FA-3DF1-3286-B224-DA3DB7CD3B92}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF} = {0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}
|
||||
{F380F865-A305-3E4D-8D5B-FB8D33192EC2} = {F380F865-A305-3E4D-8D5B-FB8D33192EC2}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "INSTALL", "INSTALL.vcxproj", "{9CA73C8F-0AB5-34C6-92C0-0C6A30C28CE5}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{A12920FA-3DF1-3286-B224-DA3DB7CD3B92} = {A12920FA-3DF1-3286-B224-DA3DB7CD3B92}
|
||||
{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF} = {0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RUN_TESTS", "RUN_TESTS.vcxproj", "{6B00B4B4-FA49-3C0E-9E2B-A30BDF389AE5}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF} = {0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZERO_CHECK", "..\\ZERO_CHECK.vcxproj", "{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example", "example.vcxproj", "{F380F865-A305-3E4D-8D5B-FB8D33192EC2}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF} = {0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}
|
||||
{F7375EBF-3777-35B1-B163-0BF71FADB554} = {F7375EBF-3777-35B1-B163-0BF71FADB554}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libprivatebin", "..\\libprivatebin.vcxproj", "{F7375EBF-3777-35B1-B163-0BF71FADB554}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF} = {0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
Release|x64 = Release|x64
|
||||
MinSizeRel|x64 = MinSizeRel|x64
|
||||
RelWithDebInfo|x64 = RelWithDebInfo|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{A12920FA-3DF1-3286-B224-DA3DB7CD3B92}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{A12920FA-3DF1-3286-B224-DA3DB7CD3B92}.Debug|x64.Build.0 = Debug|x64
|
||||
{A12920FA-3DF1-3286-B224-DA3DB7CD3B92}.Release|x64.ActiveCfg = Release|x64
|
||||
{A12920FA-3DF1-3286-B224-DA3DB7CD3B92}.Release|x64.Build.0 = Release|x64
|
||||
{A12920FA-3DF1-3286-B224-DA3DB7CD3B92}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64
|
||||
{A12920FA-3DF1-3286-B224-DA3DB7CD3B92}.MinSizeRel|x64.Build.0 = MinSizeRel|x64
|
||||
{A12920FA-3DF1-3286-B224-DA3DB7CD3B92}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
|
||||
{A12920FA-3DF1-3286-B224-DA3DB7CD3B92}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
|
||||
{9CA73C8F-0AB5-34C6-92C0-0C6A30C28CE5}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{9CA73C8F-0AB5-34C6-92C0-0C6A30C28CE5}.Release|x64.ActiveCfg = Release|x64
|
||||
{9CA73C8F-0AB5-34C6-92C0-0C6A30C28CE5}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64
|
||||
{9CA73C8F-0AB5-34C6-92C0-0C6A30C28CE5}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
|
||||
{6B00B4B4-FA49-3C0E-9E2B-A30BDF389AE5}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{6B00B4B4-FA49-3C0E-9E2B-A30BDF389AE5}.Release|x64.ActiveCfg = Release|x64
|
||||
{6B00B4B4-FA49-3C0E-9E2B-A30BDF389AE5}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64
|
||||
{6B00B4B4-FA49-3C0E-9E2B-A30BDF389AE5}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
|
||||
{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}.Debug|x64.Build.0 = Debug|x64
|
||||
{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}.Release|x64.ActiveCfg = Release|x64
|
||||
{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}.Release|x64.Build.0 = Release|x64
|
||||
{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64
|
||||
{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}.MinSizeRel|x64.Build.0 = MinSizeRel|x64
|
||||
{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
|
||||
{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
|
||||
{F380F865-A305-3E4D-8D5B-FB8D33192EC2}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{F380F865-A305-3E4D-8D5B-FB8D33192EC2}.Debug|x64.Build.0 = Debug|x64
|
||||
{F380F865-A305-3E4D-8D5B-FB8D33192EC2}.Release|x64.ActiveCfg = Release|x64
|
||||
{F380F865-A305-3E4D-8D5B-FB8D33192EC2}.Release|x64.Build.0 = Release|x64
|
||||
{F380F865-A305-3E4D-8D5B-FB8D33192EC2}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64
|
||||
{F380F865-A305-3E4D-8D5B-FB8D33192EC2}.MinSizeRel|x64.Build.0 = MinSizeRel|x64
|
||||
{F380F865-A305-3E4D-8D5B-FB8D33192EC2}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
|
||||
{F380F865-A305-3E4D-8D5B-FB8D33192EC2}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
|
||||
{F7375EBF-3777-35B1-B163-0BF71FADB554}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{F7375EBF-3777-35B1-B163-0BF71FADB554}.Debug|x64.Build.0 = Debug|x64
|
||||
{F7375EBF-3777-35B1-B163-0BF71FADB554}.Release|x64.ActiveCfg = Release|x64
|
||||
{F7375EBF-3777-35B1-B163-0BF71FADB554}.Release|x64.Build.0 = Release|x64
|
||||
{F7375EBF-3777-35B1-B163-0BF71FADB554}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64
|
||||
{F7375EBF-3777-35B1-B163-0BF71FADB554}.MinSizeRel|x64.Build.0 = MinSizeRel|x64
|
||||
{F7375EBF-3777-35B1-B163-0BF71FADB554}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
|
||||
{F7375EBF-3777-35B1-B163-0BF71FADB554}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {F2B6D5E5-7174-39FB-9275-6C09465274CF}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityAddIns) = postSolution
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
199
build-clang/example/RUN_TESTS.vcxproj
Normal file
199
build-clang/example/RUN_TESTS.vcxproj
Normal file
@ -0,0 +1,199 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="17.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="MinSizeRel|x64">
|
||||
<Configuration>MinSizeRel</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="RelWithDebInfo|x64">
|
||||
<Configuration>RelWithDebInfo</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{6B00B4B4-FA49-3C0E-9E2B-A30BDF389AE5}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<WindowsTargetPlatformVersion>10.0.26100.0</WindowsTargetPlatformVersion>
|
||||
<Platform>x64</Platform>
|
||||
<ProjectName>RUN_TESTS</ProjectName>
|
||||
<VCProjectUpgraderObjectName>NoUpgrade</VCProjectUpgraderObjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Utility</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>ClangCL</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Utility</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>ClangCL</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'" Label="Configuration">
|
||||
<ConfigurationType>Utility</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>ClangCL</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'" Label="Configuration">
|
||||
<ConfigurationType>Utility</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>ClangCL</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.20506.1</_ProjectFileVersion>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<PostBuildEvent>
|
||||
<Message></Message>
|
||||
<Command>setlocal
|
||||
"C:\Program Files\CMake\bin\ctest.exe" -C $(Configuration)
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<PostBuildEvent>
|
||||
<Message></Message>
|
||||
<Command>setlocal
|
||||
"C:\Program Files\CMake\bin\ctest.exe" -C $(Configuration)
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">
|
||||
<PostBuildEvent>
|
||||
<Message></Message>
|
||||
<Command>setlocal
|
||||
"C:\Program Files\CMake\bin\ctest.exe" -C $(Configuration)
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">
|
||||
<PostBuildEvent>
|
||||
<Message></Message>
|
||||
<Command>setlocal
|
||||
"C:\Program Files\CMake\bin\ctest.exe" -C $(Configuration)
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\CMakeFiles\f2daeb6d621bc9618657215c9680fc11\RUN_TESTS_force.rule">
|
||||
<BuildInParallel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</BuildInParallel>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> </Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">setlocal
|
||||
cd .
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\example\CMakeFiles\RUN_TESTS_force</Outputs>
|
||||
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkObjects>
|
||||
<VerifyInputsAndOutputsExist Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</VerifyInputsAndOutputsExist>
|
||||
<BuildInParallel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</BuildInParallel>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> </Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">setlocal
|
||||
cd .
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\example\CMakeFiles\RUN_TESTS_force</Outputs>
|
||||
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkObjects>
|
||||
<VerifyInputsAndOutputsExist Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</VerifyInputsAndOutputsExist>
|
||||
<BuildInParallel Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">true</BuildInParallel>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'"> </Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">setlocal
|
||||
cd .
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\example\CMakeFiles\RUN_TESTS_force</Outputs>
|
||||
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">false</LinkObjects>
|
||||
<VerifyInputsAndOutputsExist Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">false</VerifyInputsAndOutputsExist>
|
||||
<BuildInParallel Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">true</BuildInParallel>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'"> </Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">setlocal
|
||||
cd .
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\example\CMakeFiles\RUN_TESTS_force</Outputs>
|
||||
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">false</LinkObjects>
|
||||
<VerifyInputsAndOutputsExist Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">false</VerifyInputsAndOutputsExist>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\ZERO_CHECK.vcxproj">
|
||||
<Project>{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}</Project>
|
||||
<Name>ZERO_CHECK</Name>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
13
build-clang/example/RUN_TESTS.vcxproj.filters
Normal file
13
build-clang/example/RUN_TESTS.vcxproj.filters
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="17.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\CMakeFiles\f2daeb6d621bc9618657215c9680fc11\RUN_TESTS_force.rule">
|
||||
<Filter>CMake Rules</Filter>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="CMake Rules">
|
||||
<UniqueIdentifier>{A99DCD01-F97E-3DBB-AE0A-A36B621FE04A}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
470
build-clang/example/example.vcxproj
Normal file
470
build-clang/example/example.vcxproj
Normal file
@ -0,0 +1,470 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="17.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="MinSizeRel|x64">
|
||||
<Configuration>MinSizeRel</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="RelWithDebInfo|x64">
|
||||
<Configuration>RelWithDebInfo</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{F380F865-A305-3E4D-8D5B-FB8D33192EC2}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<VcpkgEnabled>false</VcpkgEnabled>
|
||||
<WindowsTargetPlatformVersion>10.0.26100.0</WindowsTargetPlatformVersion>
|
||||
<Platform>x64</Platform>
|
||||
<ProjectName>example</ProjectName>
|
||||
<VCProjectUpgraderObjectName>NoUpgrade</VCProjectUpgraderObjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>ClangCL</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>ClangCL</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>ClangCL</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>ClangCL</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="do_not_import_user.props" Condition="exists('do_not_import_user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.20506.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\example\Debug\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">example.dir\Debug\</IntDir>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">example</TargetName>
|
||||
<TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.exe</TargetExt>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
|
||||
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</GenerateManifest>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\example\Release\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">example.dir\Release\</IntDir>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">example</TargetName>
|
||||
<TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.exe</TargetExt>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
|
||||
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</GenerateManifest>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\example\MinSizeRel\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">example.dir\MinSizeRel\</IntDir>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">example</TargetName>
|
||||
<TargetExt Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">.exe</TargetExt>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">false</LinkIncremental>
|
||||
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">true</GenerateManifest>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\example\RelWithDebInfo\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">example.dir\RelWithDebInfo\</IntDir>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">example</TargetName>
|
||||
<TargetExt Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">.exe</TargetExt>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">true</LinkIncremental>
|
||||
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">true</GenerateManifest>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>C:\Users\mbusc\source\repos\privatebin-cpp\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalOptions>%(AdditionalOptions) -fprofile-instr-generate -fcoverage-mapping</AdditionalOptions>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<ExceptionHandling>Sync</ExceptionHandling>
|
||||
<ForceConformanceInForLoopScope></ForceConformanceInForLoopScope>
|
||||
<InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<MinimalRebuild></MinimalRebuild>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<RemoveUnreferencedCodeData></RemoveUnreferencedCodeData>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<SupportJustMyCode></SupportJustMyCode>
|
||||
<TreatWChar_tAsBuiltInType></TreatWChar_tAsBuiltInType>
|
||||
<UseFullPaths>false</UseFullPaths>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32;_WINDOWS;WINDOWS;CMAKE_INTDIR="Debug"</PreprocessorDefinitions>
|
||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||
<ScanSourceForModuleDependencies>false</ScanSourceForModuleDependencies>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32;_DEBUG;_WINDOWS;WINDOWS;CMAKE_INTDIR=\"Debug\"</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>C:\Users\mbusc\source\repos\privatebin-cpp\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<Midl>
|
||||
<AdditionalIncludeDirectories>C:\Users\mbusc\source\repos\privatebin-cpp\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<OutputDirectory>$(ProjectDir)/$(IntDir)</OutputDirectory>
|
||||
<HeaderFileName>%(Filename).h</HeaderFileName>
|
||||
<TypeLibraryName>%(Filename).tlb</TypeLibraryName>
|
||||
<InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
|
||||
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
|
||||
</Midl>
|
||||
<PostBuildEvent>
|
||||
<Message> </Message>
|
||||
<Command>setlocal
|
||||
"C:\Program Files\PowerShell\7\pwsh.exe" -noprofile -executionpolicy Bypass -file C:/Users/mbusc/vcpkg/scripts/buildsystems/msbuild/applocal.ps1 -targetBinary C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/example/Debug/example.exe -installedDir C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/vcpkg_installed/x64-windows/debug/bin -OutVariable out
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd
|
||||
setlocal
|
||||
"C:\Program Files\CMake\bin\cmake.exe" -E copy_if_different C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/Debug/libprivatebin.dll C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/example/Debug
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
</PostBuildEvent>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\Debug\libprivatebin.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalOptions>%(AdditionalOptions) /machine:x64</AdditionalOptions>
|
||||
<DataExecutionPrevention></DataExecutionPrevention>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<ImageHasSafeExceptionHandlers></ImageHasSafeExceptionHandlers>
|
||||
<ImportLibrary>C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/example/Debug/example.lib</ImportLibrary>
|
||||
<LinkErrorReporting></LinkErrorReporting>
|
||||
<ProgramDataBaseFile>C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/example/Debug/example.pdb</ProgramDataBaseFile>
|
||||
<RandomizedBaseAddress></RandomizedBaseAddress>
|
||||
<SubSystem>Console</SubSystem>
|
||||
</Link>
|
||||
<ProjectReference>
|
||||
<LinkLibraryDependencies>false</LinkLibraryDependencies>
|
||||
</ProjectReference>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>C:\Users\mbusc\source\repos\privatebin-cpp\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalOptions>%(AdditionalOptions) -fprofile-instr-generate -fcoverage-mapping</AdditionalOptions>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<ExceptionHandling>Sync</ExceptionHandling>
|
||||
<ForceConformanceInForLoopScope></ForceConformanceInForLoopScope>
|
||||
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<MinimalRebuild></MinimalRebuild>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<RemoveUnreferencedCodeData></RemoveUnreferencedCodeData>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<SupportJustMyCode></SupportJustMyCode>
|
||||
<TreatWChar_tAsBuiltInType></TreatWChar_tAsBuiltInType>
|
||||
<UseFullPaths>false</UseFullPaths>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;WINDOWS;CMAKE_INTDIR="Release"</PreprocessorDefinitions>
|
||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||
<DebugInformationFormat>
|
||||
</DebugInformationFormat>
|
||||
<ScanSourceForModuleDependencies>false</ScanSourceForModuleDependencies>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;WINDOWS;CMAKE_INTDIR=\"Release\"</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>C:\Users\mbusc\source\repos\privatebin-cpp\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<Midl>
|
||||
<AdditionalIncludeDirectories>C:\Users\mbusc\source\repos\privatebin-cpp\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<OutputDirectory>$(ProjectDir)/$(IntDir)</OutputDirectory>
|
||||
<HeaderFileName>%(Filename).h</HeaderFileName>
|
||||
<TypeLibraryName>%(Filename).tlb</TypeLibraryName>
|
||||
<InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
|
||||
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
|
||||
</Midl>
|
||||
<PostBuildEvent>
|
||||
<Message> </Message>
|
||||
<Command>setlocal
|
||||
"C:\Program Files\PowerShell\7\pwsh.exe" -noprofile -executionpolicy Bypass -file C:/Users/mbusc/vcpkg/scripts/buildsystems/msbuild/applocal.ps1 -targetBinary C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/example/Release/example.exe -installedDir C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/vcpkg_installed/x64-windows/bin -OutVariable out
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd
|
||||
setlocal
|
||||
"C:\Program Files\CMake\bin\cmake.exe" -E copy_if_different C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/Release/libprivatebin.dll C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/example/Release
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
</PostBuildEvent>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\Release\libprivatebin.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalOptions>%(AdditionalOptions) /machine:x64</AdditionalOptions>
|
||||
<DataExecutionPrevention></DataExecutionPrevention>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<ImageHasSafeExceptionHandlers></ImageHasSafeExceptionHandlers>
|
||||
<ImportLibrary>C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/example/Release/example.lib</ImportLibrary>
|
||||
<LinkErrorReporting></LinkErrorReporting>
|
||||
<ProgramDataBaseFile>C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/example/Release/example.pdb</ProgramDataBaseFile>
|
||||
<RandomizedBaseAddress></RandomizedBaseAddress>
|
||||
<SubSystem>Console</SubSystem>
|
||||
</Link>
|
||||
<ProjectReference>
|
||||
<LinkLibraryDependencies>false</LinkLibraryDependencies>
|
||||
</ProjectReference>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>C:\Users\mbusc\source\repos\privatebin-cpp\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalOptions>%(AdditionalOptions) -fprofile-instr-generate -fcoverage-mapping</AdditionalOptions>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<ExceptionHandling>Sync</ExceptionHandling>
|
||||
<ForceConformanceInForLoopScope></ForceConformanceInForLoopScope>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<MinimalRebuild></MinimalRebuild>
|
||||
<Optimization>MinSpace</Optimization>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<RemoveUnreferencedCodeData></RemoveUnreferencedCodeData>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<SupportJustMyCode></SupportJustMyCode>
|
||||
<TreatWChar_tAsBuiltInType></TreatWChar_tAsBuiltInType>
|
||||
<UseFullPaths>false</UseFullPaths>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;WINDOWS;CMAKE_INTDIR="MinSizeRel"</PreprocessorDefinitions>
|
||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||
<DebugInformationFormat>
|
||||
</DebugInformationFormat>
|
||||
<ScanSourceForModuleDependencies>false</ScanSourceForModuleDependencies>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;WINDOWS;CMAKE_INTDIR=\"MinSizeRel\"</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>C:\Users\mbusc\source\repos\privatebin-cpp\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<Midl>
|
||||
<AdditionalIncludeDirectories>C:\Users\mbusc\source\repos\privatebin-cpp\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<OutputDirectory>$(ProjectDir)/$(IntDir)</OutputDirectory>
|
||||
<HeaderFileName>%(Filename).h</HeaderFileName>
|
||||
<TypeLibraryName>%(Filename).tlb</TypeLibraryName>
|
||||
<InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
|
||||
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
|
||||
</Midl>
|
||||
<PostBuildEvent>
|
||||
<Message> </Message>
|
||||
<Command>setlocal
|
||||
"C:\Program Files\PowerShell\7\pwsh.exe" -noprofile -executionpolicy Bypass -file C:/Users/mbusc/vcpkg/scripts/buildsystems/msbuild/applocal.ps1 -targetBinary C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/example/MinSizeRel/example.exe -installedDir C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/vcpkg_installed/x64-windows/bin -OutVariable out
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd
|
||||
setlocal
|
||||
"C:\Program Files\CMake\bin\cmake.exe" -E copy_if_different C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/MinSizeRel/libprivatebin.dll C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/example/MinSizeRel
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
</PostBuildEvent>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\MinSizeRel\libprivatebin.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalOptions>%(AdditionalOptions) /machine:x64</AdditionalOptions>
|
||||
<DataExecutionPrevention></DataExecutionPrevention>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<ImageHasSafeExceptionHandlers></ImageHasSafeExceptionHandlers>
|
||||
<ImportLibrary>C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/example/MinSizeRel/example.lib</ImportLibrary>
|
||||
<LinkErrorReporting></LinkErrorReporting>
|
||||
<ProgramDataBaseFile>C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/example/MinSizeRel/example.pdb</ProgramDataBaseFile>
|
||||
<RandomizedBaseAddress></RandomizedBaseAddress>
|
||||
<SubSystem>Console</SubSystem>
|
||||
</Link>
|
||||
<ProjectReference>
|
||||
<LinkLibraryDependencies>false</LinkLibraryDependencies>
|
||||
</ProjectReference>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>C:\Users\mbusc\source\repos\privatebin-cpp\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalOptions>%(AdditionalOptions) -fprofile-instr-generate -fcoverage-mapping</AdditionalOptions>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<ExceptionHandling>Sync</ExceptionHandling>
|
||||
<ForceConformanceInForLoopScope></ForceConformanceInForLoopScope>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<MinimalRebuild></MinimalRebuild>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<RemoveUnreferencedCodeData></RemoveUnreferencedCodeData>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<SupportJustMyCode></SupportJustMyCode>
|
||||
<TreatWChar_tAsBuiltInType></TreatWChar_tAsBuiltInType>
|
||||
<UseFullPaths>false</UseFullPaths>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;WINDOWS;CMAKE_INTDIR="RelWithDebInfo"</PreprocessorDefinitions>
|
||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||
<ScanSourceForModuleDependencies>false</ScanSourceForModuleDependencies>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;WINDOWS;CMAKE_INTDIR=\"RelWithDebInfo\"</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>C:\Users\mbusc\source\repos\privatebin-cpp\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<Midl>
|
||||
<AdditionalIncludeDirectories>C:\Users\mbusc\source\repos\privatebin-cpp\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<OutputDirectory>$(ProjectDir)/$(IntDir)</OutputDirectory>
|
||||
<HeaderFileName>%(Filename).h</HeaderFileName>
|
||||
<TypeLibraryName>%(Filename).tlb</TypeLibraryName>
|
||||
<InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
|
||||
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
|
||||
</Midl>
|
||||
<PostBuildEvent>
|
||||
<Message> </Message>
|
||||
<Command>setlocal
|
||||
"C:\Program Files\PowerShell\7\pwsh.exe" -noprofile -executionpolicy Bypass -file C:/Users/mbusc/vcpkg/scripts/buildsystems/msbuild/applocal.ps1 -targetBinary C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/example/RelWithDebInfo/example.exe -installedDir C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/vcpkg_installed/x64-windows/bin -OutVariable out
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd
|
||||
setlocal
|
||||
"C:\Program Files\CMake\bin\cmake.exe" -E copy_if_different C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/RelWithDebInfo/libprivatebin.dll C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/example/RelWithDebInfo
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
</PostBuildEvent>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\RelWithDebInfo\libprivatebin.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalOptions>%(AdditionalOptions) /machine:x64</AdditionalOptions>
|
||||
<DataExecutionPrevention></DataExecutionPrevention>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<ImageHasSafeExceptionHandlers></ImageHasSafeExceptionHandlers>
|
||||
<ImportLibrary>C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/example/RelWithDebInfo/example.lib</ImportLibrary>
|
||||
<LinkErrorReporting></LinkErrorReporting>
|
||||
<ProgramDataBaseFile>C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/example/RelWithDebInfo/example.pdb</ProgramDataBaseFile>
|
||||
<RandomizedBaseAddress></RandomizedBaseAddress>
|
||||
<SubSystem>Console</SubSystem>
|
||||
</Link>
|
||||
<ProjectReference>
|
||||
<LinkLibraryDependencies>false</LinkLibraryDependencies>
|
||||
</ProjectReference>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="C:\Users\mbusc\source\repos\privatebin-cpp\example\CMakeLists.txt">
|
||||
<UseUtf8Encoding>Always</UseUtf8Encoding>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Building Custom Rule C:/Users/mbusc/source/repos/privatebin-cpp/example/CMakeLists.txt</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">setlocal
|
||||
"C:\Program Files\CMake\bin\cmake.exe" -SC:/Users/mbusc/source/repos/privatebin-cpp -BC:/Users/mbusc/source/repos/privatebin-cpp/build-clang --check-stamp-file C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/example/CMakeFiles/generate.stamp
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\example\CMakeFiles\generate.stamp</Outputs>
|
||||
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkObjects>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Building Custom Rule C:/Users/mbusc/source/repos/privatebin-cpp/example/CMakeLists.txt</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">setlocal
|
||||
"C:\Program Files\CMake\bin\cmake.exe" -SC:/Users/mbusc/source/repos/privatebin-cpp -BC:/Users/mbusc/source/repos/privatebin-cpp/build-clang --check-stamp-file C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/example/CMakeFiles/generate.stamp
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\example\CMakeFiles\generate.stamp</Outputs>
|
||||
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkObjects>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">Building Custom Rule C:/Users/mbusc/source/repos/privatebin-cpp/example/CMakeLists.txt</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">setlocal
|
||||
"C:\Program Files\CMake\bin\cmake.exe" -SC:/Users/mbusc/source/repos/privatebin-cpp -BC:/Users/mbusc/source/repos/privatebin-cpp/build-clang --check-stamp-file C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/example/CMakeFiles/generate.stamp
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\example\CMakeFiles\generate.stamp</Outputs>
|
||||
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">false</LinkObjects>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">Building Custom Rule C:/Users/mbusc/source/repos/privatebin-cpp/example/CMakeLists.txt</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">setlocal
|
||||
"C:\Program Files\CMake\bin\cmake.exe" -SC:/Users/mbusc/source/repos/privatebin-cpp -BC:/Users/mbusc/source/repos/privatebin-cpp/build-clang --check-stamp-file C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/example/CMakeFiles/generate.stamp
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\example\CMakeFiles\generate.stamp</Outputs>
|
||||
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">false</LinkObjects>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="C:\Users\mbusc\source\repos\privatebin-cpp\example\example.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\ZERO_CHECK.vcxproj">
|
||||
<Project>{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}</Project>
|
||||
<Name>ZERO_CHECK</Name>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\libprivatebin.vcxproj">
|
||||
<Project>{F7375EBF-3777-35B1-B163-0BF71FADB554}</Project>
|
||||
<Name>libprivatebin</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
16
build-clang/example/example.vcxproj.filters
Normal file
16
build-clang/example/example.vcxproj.filters
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="17.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<ClCompile Include="C:\Users\mbusc\source\repos\privatebin-cpp\example\example.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="C:\Users\mbusc\source\repos\privatebin-cpp\example\CMakeLists.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{AE7BCFB5-08F5-3BD2-B8BD-53713BA5E6E6}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project>
|
||||
<ProjectOutputs>
|
||||
<ProjectOutput>
|
||||
<FullPath>C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\x64\Release\ZERO_CHECK</FullPath>
|
||||
</ProjectOutput>
|
||||
<ProjectOutput>
|
||||
<FullPath>C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\Release\libprivatebin.dll</FullPath>
|
||||
</ProjectOutput>
|
||||
</ProjectOutputs>
|
||||
<ContentFiles />
|
||||
<SatelliteDlls />
|
||||
<NonRecipeFileRefs />
|
||||
</Project>
|
||||
@ -0,0 +1,5 @@
|
||||
C:\Users\mbusc\source\repos\privatebin-cpp\src\libprivatebin.cpp;C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\libprivatebin.dir\Release\libprivatebin.obj
|
||||
C:\Users\mbusc\source\repos\privatebin-cpp\src\http_client.cpp;C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\libprivatebin.dir\Release\http_client.obj
|
||||
C:\Users\mbusc\source\repos\privatebin-cpp\src\crypto.cpp;C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\libprivatebin.dir\Release\crypto.obj
|
||||
C:\Users\mbusc\source\repos\privatebin-cpp\src\json_parser.cpp;C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\libprivatebin.dir\Release\json_parser.obj
|
||||
C:\Users\mbusc\source\repos\privatebin-cpp\src\base58.cpp;C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\libprivatebin.dir\Release\base58.obj
|
||||
@ -0,0 +1,10 @@
|
||||
^C:\USERS\MBUSC\SOURCE\REPOS\PRIVATEBIN-CPP\CMAKELISTS.TXT
|
||||
setlocal
|
||||
"C:\Program Files\CMake\bin\cmake.exe" -SC:/Users/mbusc/source/repos/privatebin-cpp -BC:/Users/mbusc/source/repos/privatebin-cpp/build-clang --check-stamp-file C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/CMakeFiles/generate.stamp
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd
|
||||
@ -0,0 +1,141 @@
|
||||
^C:\USERS\MBUSC\SOURCE\REPOS\PRIVATEBIN-CPP\CMAKELISTS.TXT
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\CMAKECCOMPILER.CMAKE.IN
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\CMAKECCOMPILERABI.C
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\CMAKECINFORMATION.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\CMAKECXXCOMPILER.CMAKE.IN
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\CMAKECXXCOMPILERABI.CPP
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\CMAKECXXINFORMATION.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\CMAKECOMMONLANGUAGEINCLUDE.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\CMAKECOMPILERIDDETECTION.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\CMAKEDEPENDENTOPTION.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\CMAKEDETERMINECCOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\CMAKEDETERMINECXXCOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\CMAKEDETERMINECOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\CMAKEDETERMINECOMPILERABI.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\CMAKEDETERMINECOMPILERID.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\CMAKEDETERMINECOMPILERSUPPORT.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\CMAKEDETERMINERCCOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\CMAKEDETERMINESYSTEM.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\CMAKEFINDBINUTILS.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\CMAKEGENERICSYSTEM.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\CMAKEINITIALIZECONFIGS.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\CMAKELANGUAGEINFORMATION.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\CMAKEPARSEIMPLICITINCLUDEINFO.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\CMAKEPARSEIMPLICITLINKINFO.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\CMAKEPARSELIBRARYARCHITECTURE.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\CMAKERCCOMPILER.CMAKE.IN
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\CMAKERCINFORMATION.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\CMAKESYSTEM.CMAKE.IN
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\CMAKESYSTEMSPECIFICINFORMATION.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\CMAKESYSTEMSPECIFICINITIALIZE.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\CMAKETESTCCOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\CMAKETESTCXXCOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\CMAKETESTCOMPILERCOMMON.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\CMAKETESTRCCOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\CTEST.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\CTESTTARGETS.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\CTESTUSELAUNCHERS.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\ADSP-DETERMINECOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\ARMCC-DETERMINECOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\ARMCLANG-DETERMINECOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\APPLECLANG-DETERMINECOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\BORLAND-DETERMINECOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\BRUCE-C-DETERMINECOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\CMAKECOMMONCOMPILERMACROS.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\CLANG-C.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\CLANG-CXX-FEATURETESTS.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\CLANG-CXX-TESTABLEFEATURES.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\CLANG-CXX.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\CLANG-DETERMINECOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\CLANG-DETERMINECOMPILERINTERNAL.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\CLANG-FINDBINUTILS.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\CLANG.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\COMPAQ-C-DETERMINECOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\COMPAQ-CXX-DETERMINECOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\CRAY-DETERMINECOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\CRAYCLANG-DETERMINECOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\DIAB-DETERMINECOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\EMBARCADERO-DETERMINECOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\FUJITSU-DETERMINECOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\FUJITSUCLANG-DETERMINECOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\GHS-DETERMINECOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\GNU-C-DETERMINECOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\GNU-CXX-DETERMINECOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\HP-C-DETERMINECOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\HP-CXX-DETERMINECOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\IAR-DETERMINECOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\IBMCPP-C-DETERMINEVERSIONINTERNAL.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\IBMCPP-CXX-DETERMINEVERSIONINTERNAL.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\IBMCLANG-C-DETERMINECOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\IBMCLANG-CXX-DETERMINECOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\INTEL-DETERMINECOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\INTELLLVM-DETERMINECOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\LCC-C-DETERMINECOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\LCC-CXX-DETERMINECOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\MSVC-DETERMINECOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\NVHPC-DETERMINECOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\NVIDIA-DETERMINECOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\OPENWATCOM-DETERMINECOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\ORANGEC-DETERMINECOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\PGI-DETERMINECOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\PATHSCALE-DETERMINECOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\RENESAS-DETERMINECOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\SCO-DETERMINECOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\SDCC-C-DETERMINECOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\SUNPRO-C-DETERMINECOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\SUNPRO-CXX-DETERMINECOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\TI-DETERMINECOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\TICLANG-DETERMINECOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\TASKING-DETERMINECOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\TINYCC-C-DETERMINECOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\VISUALAGE-C-DETERMINECOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\VISUALAGE-CXX-DETERMINECOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\WATCOM-DETERMINECOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\XL-C-DETERMINECOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\XL-CXX-DETERMINECOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\XLCLANG-C-DETERMINECOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\XLCLANG-CXX-DETERMINECOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\ZOS-C-DETERMINECOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILER\ZOS-CXX-DETERMINECOMPILER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\COMPILERID\VS-10.VCXPROJ.IN
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\DARTCONFIGURATION.TCL.IN
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\FINDPACKAGEHANDLESTANDARDARGS.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\FINDPACKAGEMESSAGE.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\INTERNAL\CMAKECLINKERINFORMATION.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\INTERNAL\CMAKECXXLINKERINFORMATION.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\INTERNAL\CMAKECOMMONLINKERINFORMATION.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\INTERNAL\CMAKEDETERMINELINKERID.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\INTERNAL\CMAKEINSPECTCLINKER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\INTERNAL\CMAKEINSPECTCXXLINKER.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\INTERNAL\FEATURETESTING.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\LINKER\LLD-C.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\LINKER\LLD-CXX.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\LINKER\LLD.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\LINKER\MSVC.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\PLATFORM\LINKER\WINDOWS-LLD-C.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\PLATFORM\LINKER\WINDOWS-LLD-CXX.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\PLATFORM\LINKER\WINDOWS-LLD.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\PLATFORM\LINKER\WINDOWS-MSVC.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\PLATFORM\WINDOWS-CLANG-C.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\PLATFORM\WINDOWS-CLANG-CXX.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\PLATFORM\WINDOWS-CLANG.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\PLATFORM\WINDOWS-DETERMINE-CXX.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\PLATFORM\WINDOWS-INITIALIZE.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\PLATFORM\WINDOWS-MSVC.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\PLATFORM\WINDOWS.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\MODULES\PLATFORM\WINDOWSPATHS.CMAKE
|
||||
C:\PROGRAM FILES\CMAKE\SHARE\CMAKE-4.1\TEMPLATES\CTESTSCRIPT.CMAKE.IN
|
||||
C:\USERS\MBUSC\SOURCE\REPOS\PRIVATEBIN-CPP\BUILD-CLANG\CMAKEFILES\4.1.0\CMAKECCOMPILER.CMAKE
|
||||
C:\USERS\MBUSC\SOURCE\REPOS\PRIVATEBIN-CPP\BUILD-CLANG\CMAKEFILES\4.1.0\CMAKECXXCOMPILER.CMAKE
|
||||
C:\USERS\MBUSC\SOURCE\REPOS\PRIVATEBIN-CPP\BUILD-CLANG\CMAKEFILES\4.1.0\CMAKERCCOMPILER.CMAKE
|
||||
C:\USERS\MBUSC\SOURCE\REPOS\PRIVATEBIN-CPP\BUILD-CLANG\CMAKEFILES\4.1.0\CMAKESYSTEM.CMAKE
|
||||
C:\USERS\MBUSC\SOURCE\REPOS\PRIVATEBIN-CPP\BUILD-CLANG\VCPKG_INSTALLED\X64-WINDOWS\SHARE\CRYPTOPP\CRYPTOPP-STATIC-TARGETS-DEBUG.CMAKE
|
||||
C:\USERS\MBUSC\SOURCE\REPOS\PRIVATEBIN-CPP\BUILD-CLANG\VCPKG_INSTALLED\X64-WINDOWS\SHARE\CRYPTOPP\CRYPTOPP-STATIC-TARGETS-RELEASE.CMAKE
|
||||
C:\USERS\MBUSC\SOURCE\REPOS\PRIVATEBIN-CPP\BUILD-CLANG\VCPKG_INSTALLED\X64-WINDOWS\SHARE\CRYPTOPP\CRYPTOPP-STATIC-TARGETS.CMAKE
|
||||
C:\USERS\MBUSC\SOURCE\REPOS\PRIVATEBIN-CPP\BUILD-CLANG\VCPKG_INSTALLED\X64-WINDOWS\SHARE\CRYPTOPP\CRYPTOPPCONFIG.CMAKE
|
||||
C:\USERS\MBUSC\SOURCE\REPOS\PRIVATEBIN-CPP\BUILD-CLANG\VCPKG_INSTALLED\X64-WINDOWS\SHARE\CRYPTOPP\CRYPTOPPCONFIGVERSION.CMAKE
|
||||
C:\USERS\MBUSC\SOURCE\REPOS\PRIVATEBIN-CPP\BUILD-CLANG\VCPKG_INSTALLED\X64-WINDOWS\SHARE\NLOHMANN_JSON\NLOHMANN_JSONCONFIG.CMAKE
|
||||
C:\USERS\MBUSC\SOURCE\REPOS\PRIVATEBIN-CPP\BUILD-CLANG\VCPKG_INSTALLED\X64-WINDOWS\SHARE\NLOHMANN_JSON\NLOHMANN_JSONCONFIGVERSION.CMAKE
|
||||
C:\USERS\MBUSC\SOURCE\REPOS\PRIVATEBIN-CPP\BUILD-CLANG\VCPKG_INSTALLED\X64-WINDOWS\SHARE\NLOHMANN_JSON\NLOHMANN_JSONTARGETS.CMAKE
|
||||
C:\USERS\MBUSC\SOURCE\REPOS\PRIVATEBIN-CPP\VCPKG.JSON
|
||||
C:\USERS\MBUSC\VCPKG\SCRIPTS\BUILDSYSTEMS\VCPKG.CMAKE
|
||||
@ -0,0 +1,2 @@
|
||||
^C:\USERS\MBUSC\SOURCE\REPOS\PRIVATEBIN-CPP\CMAKELISTS.TXT
|
||||
C:\USERS\MBUSC\SOURCE\REPOS\PRIVATEBIN-CPP\BUILD-CLANG\CMAKEFILES\GENERATE.STAMP
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,2 @@
|
||||
PlatformToolSet=ClangCL:VCToolArchitecture=Native64Bit:VCToolsVersion=14.44.35207:TargetPlatformVersion=10.0.26100.0:VcpkgTriplet=x64-windows:
|
||||
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\Llvm\x64|19.1.5|Release|x64|C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\|
|
||||
Binary file not shown.
Binary file not shown.
@ -0,0 +1,2 @@
|
||||
^C:\USERS\MBUSC\SOURCE\REPOS\PRIVATEBIN-CPP\BUILD-CLANG\LIBPRIVATEBIN.DIR\RELEASE\BASE58.OBJ|C:\USERS\MBUSC\SOURCE\REPOS\PRIVATEBIN-CPP\BUILD-CLANG\LIBPRIVATEBIN.DIR\RELEASE\CRYPTO.OBJ|C:\USERS\MBUSC\SOURCE\REPOS\PRIVATEBIN-CPP\BUILD-CLANG\LIBPRIVATEBIN.DIR\RELEASE\HTTP_CLIENT.OBJ|C:\USERS\MBUSC\SOURCE\REPOS\PRIVATEBIN-CPP\BUILD-CLANG\LIBPRIVATEBIN.DIR\RELEASE\JSON_PARSER.OBJ|C:\USERS\MBUSC\SOURCE\REPOS\PRIVATEBIN-CPP\BUILD-CLANG\LIBPRIVATEBIN.DIR\RELEASE\LIBPRIVATEBIN.OBJ
|
||||
C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\Release\libprivatebin.lib
|
||||
Binary file not shown.
442
build-clang/libprivatebin.vcxproj
Normal file
442
build-clang/libprivatebin.vcxproj
Normal file
File diff suppressed because one or more lines are too long
51
build-clang/libprivatebin.vcxproj.filters
Normal file
51
build-clang/libprivatebin.vcxproj.filters
Normal file
@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="17.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<ClCompile Include="C:\Users\mbusc\source\repos\privatebin-cpp\src\libprivatebin.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="C:\Users\mbusc\source\repos\privatebin-cpp\src\http_client.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="C:\Users\mbusc\source\repos\privatebin-cpp\src\crypto.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="C:\Users\mbusc\source\repos\privatebin-cpp\src\json_parser.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="C:\Users\mbusc\source\repos\privatebin-cpp\src\base58.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="C:\Users\mbusc\source\repos\privatebin-cpp\include\libprivatebin.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="C:\Users\mbusc\source\repos\privatebin-cpp\include\http_client.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="C:\Users\mbusc\source\repos\privatebin-cpp\include\crypto.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="C:\Users\mbusc\source\repos\privatebin-cpp\include\json_parser.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="C:\Users\mbusc\source\repos\privatebin-cpp\include\base58.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="C:\Users\mbusc\source\repos\privatebin-cpp\CMakeLists.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Natvis Include="C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\vcpkg_installed\x64-windows\share\nlohmann_json\nlohmann_json.natvis" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{43F446EB-51AB-39B1-9102-792B408D87A3}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{AE7BCFB5-08F5-3BD2-B8BD-53713BA5E6E6}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
185
build-clang/tests/ALL_BUILD.vcxproj
Normal file
185
build-clang/tests/ALL_BUILD.vcxproj
Normal file
@ -0,0 +1,185 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="17.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ResolveNugetPackages>false</ResolveNugetPackages>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="MinSizeRel|x64">
|
||||
<Configuration>MinSizeRel</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="RelWithDebInfo|x64">
|
||||
<Configuration>RelWithDebInfo</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{A12920FA-3DF1-3286-B224-DA3DB7CD3B92}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<WindowsTargetPlatformVersion>10.0.26100.0</WindowsTargetPlatformVersion>
|
||||
<Platform>x64</Platform>
|
||||
<ProjectName>ALL_BUILD</ProjectName>
|
||||
<VCProjectUpgraderObjectName>NoUpgrade</VCProjectUpgraderObjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Utility</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>ClangCL</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Utility</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>ClangCL</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'" Label="Configuration">
|
||||
<ConfigurationType>Utility</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>ClangCL</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'" Label="Configuration">
|
||||
<ConfigurationType>Utility</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>ClangCL</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.20506.1</_ProjectFileVersion>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Midl>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<OutputDirectory>$(ProjectDir)/$(IntDir)</OutputDirectory>
|
||||
<HeaderFileName>%(Filename).h</HeaderFileName>
|
||||
<TypeLibraryName>%(Filename).tlb</TypeLibraryName>
|
||||
<InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
|
||||
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
|
||||
</Midl>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Midl>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<OutputDirectory>$(ProjectDir)/$(IntDir)</OutputDirectory>
|
||||
<HeaderFileName>%(Filename).h</HeaderFileName>
|
||||
<TypeLibraryName>%(Filename).tlb</TypeLibraryName>
|
||||
<InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
|
||||
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
|
||||
</Midl>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">
|
||||
<Midl>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<OutputDirectory>$(ProjectDir)/$(IntDir)</OutputDirectory>
|
||||
<HeaderFileName>%(Filename).h</HeaderFileName>
|
||||
<TypeLibraryName>%(Filename).tlb</TypeLibraryName>
|
||||
<InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
|
||||
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
|
||||
</Midl>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">
|
||||
<Midl>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<OutputDirectory>$(ProjectDir)/$(IntDir)</OutputDirectory>
|
||||
<HeaderFileName>%(Filename).h</HeaderFileName>
|
||||
<TypeLibraryName>%(Filename).tlb</TypeLibraryName>
|
||||
<InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
|
||||
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
|
||||
</Midl>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="C:\Users\mbusc\source\repos\privatebin-cpp\tests\CMakeLists.txt">
|
||||
<UseUtf8Encoding>Always</UseUtf8Encoding>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Building Custom Rule C:/Users/mbusc/source/repos/privatebin-cpp/tests/CMakeLists.txt</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">setlocal
|
||||
"C:\Program Files\CMake\bin\cmake.exe" -SC:/Users/mbusc/source/repos/privatebin-cpp -BC:/Users/mbusc/source/repos/privatebin-cpp/build-clang --check-stamp-file C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/tests/CMakeFiles/generate.stamp
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\tests\CMakeFiles\generate.stamp</Outputs>
|
||||
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkObjects>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Building Custom Rule C:/Users/mbusc/source/repos/privatebin-cpp/tests/CMakeLists.txt</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">setlocal
|
||||
"C:\Program Files\CMake\bin\cmake.exe" -SC:/Users/mbusc/source/repos/privatebin-cpp -BC:/Users/mbusc/source/repos/privatebin-cpp/build-clang --check-stamp-file C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/tests/CMakeFiles/generate.stamp
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\tests\CMakeFiles\generate.stamp</Outputs>
|
||||
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkObjects>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">Building Custom Rule C:/Users/mbusc/source/repos/privatebin-cpp/tests/CMakeLists.txt</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">setlocal
|
||||
"C:\Program Files\CMake\bin\cmake.exe" -SC:/Users/mbusc/source/repos/privatebin-cpp -BC:/Users/mbusc/source/repos/privatebin-cpp/build-clang --check-stamp-file C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/tests/CMakeFiles/generate.stamp
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\tests\CMakeFiles\generate.stamp</Outputs>
|
||||
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">false</LinkObjects>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">Building Custom Rule C:/Users/mbusc/source/repos/privatebin-cpp/tests/CMakeLists.txt</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">setlocal
|
||||
"C:\Program Files\CMake\bin\cmake.exe" -SC:/Users/mbusc/source/repos/privatebin-cpp -BC:/Users/mbusc/source/repos/privatebin-cpp/build-clang --check-stamp-file C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/tests/CMakeFiles/generate.stamp
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\tests\CMakeFiles\generate.stamp</Outputs>
|
||||
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">false</LinkObjects>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\ZERO_CHECK.vcxproj">
|
||||
<Project>{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}</Project>
|
||||
<Name>ZERO_CHECK</Name>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\tests\test_basic.vcxproj">
|
||||
<Project>{C3F88C47-123F-3064-9A29-E5E341930946}</Project>
|
||||
<Name>test_basic</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
8
build-clang/tests/ALL_BUILD.vcxproj.filters
Normal file
8
build-clang/tests/ALL_BUILD.vcxproj.filters
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="17.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="C:\Users\mbusc\source\repos\privatebin-cpp\tests\CMakeLists.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
36
build-clang/tests/CTestTestfile.cmake
Normal file
36
build-clang/tests/CTestTestfile.cmake
Normal file
@ -0,0 +1,36 @@
|
||||
# CMake generated Testfile for
|
||||
# Source directory: C:/Users/mbusc/source/repos/privatebin-cpp/tests
|
||||
# Build directory: C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/tests
|
||||
#
|
||||
# This file includes the relevant testing commands required for
|
||||
# testing this directory and lists subdirectories to be tested as well.
|
||||
if(CTEST_CONFIGURATION_TYPE MATCHES "^([Dd][Ee][Bb][Uu][Gg])$")
|
||||
add_test(test_basic "C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/tests/Debug/test_basic.exe")
|
||||
set_tests_properties(test_basic PROPERTIES _BACKTRACE_TRIPLES "C:/Users/mbusc/source/repos/privatebin-cpp/tests/CMakeLists.txt;40;add_test;C:/Users/mbusc/source/repos/privatebin-cpp/tests/CMakeLists.txt;0;")
|
||||
elseif(CTEST_CONFIGURATION_TYPE MATCHES "^([Rr][Ee][Ll][Ee][Aa][Ss][Ee])$")
|
||||
add_test(test_basic "C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/tests/Release/test_basic.exe")
|
||||
set_tests_properties(test_basic PROPERTIES _BACKTRACE_TRIPLES "C:/Users/mbusc/source/repos/privatebin-cpp/tests/CMakeLists.txt;40;add_test;C:/Users/mbusc/source/repos/privatebin-cpp/tests/CMakeLists.txt;0;")
|
||||
elseif(CTEST_CONFIGURATION_TYPE MATCHES "^([Mm][Ii][Nn][Ss][Ii][Zz][Ee][Rr][Ee][Ll])$")
|
||||
add_test(test_basic "C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/tests/MinSizeRel/test_basic.exe")
|
||||
set_tests_properties(test_basic PROPERTIES _BACKTRACE_TRIPLES "C:/Users/mbusc/source/repos/privatebin-cpp/tests/CMakeLists.txt;40;add_test;C:/Users/mbusc/source/repos/privatebin-cpp/tests/CMakeLists.txt;0;")
|
||||
elseif(CTEST_CONFIGURATION_TYPE MATCHES "^([Rr][Ee][Ll][Ww][Ii][Tt][Hh][Dd][Ee][Bb][Ii][Nn][Ff][Oo])$")
|
||||
add_test(test_basic "C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/tests/RelWithDebInfo/test_basic.exe")
|
||||
set_tests_properties(test_basic PROPERTIES _BACKTRACE_TRIPLES "C:/Users/mbusc/source/repos/privatebin-cpp/tests/CMakeLists.txt;40;add_test;C:/Users/mbusc/source/repos/privatebin-cpp/tests/CMakeLists.txt;0;")
|
||||
else()
|
||||
add_test(test_basic NOT_AVAILABLE)
|
||||
endif()
|
||||
if(CTEST_CONFIGURATION_TYPE MATCHES "^([Dd][Ee][Bb][Uu][Gg])$")
|
||||
add_test(example_run "C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/example/Debug/example.exe")
|
||||
set_tests_properties(example_run PROPERTIES DISABLED "TRUE" _BACKTRACE_TRIPLES "C:/Users/mbusc/source/repos/privatebin-cpp/tests/CMakeLists.txt;44;add_test;C:/Users/mbusc/source/repos/privatebin-cpp/tests/CMakeLists.txt;0;")
|
||||
elseif(CTEST_CONFIGURATION_TYPE MATCHES "^([Rr][Ee][Ll][Ee][Aa][Ss][Ee])$")
|
||||
add_test(example_run "C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/example/Release/example.exe")
|
||||
set_tests_properties(example_run PROPERTIES DISABLED "TRUE" _BACKTRACE_TRIPLES "C:/Users/mbusc/source/repos/privatebin-cpp/tests/CMakeLists.txt;44;add_test;C:/Users/mbusc/source/repos/privatebin-cpp/tests/CMakeLists.txt;0;")
|
||||
elseif(CTEST_CONFIGURATION_TYPE MATCHES "^([Mm][Ii][Nn][Ss][Ii][Zz][Ee][Rr][Ee][Ll])$")
|
||||
add_test(example_run "C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/example/MinSizeRel/example.exe")
|
||||
set_tests_properties(example_run PROPERTIES DISABLED "TRUE" _BACKTRACE_TRIPLES "C:/Users/mbusc/source/repos/privatebin-cpp/tests/CMakeLists.txt;44;add_test;C:/Users/mbusc/source/repos/privatebin-cpp/tests/CMakeLists.txt;0;")
|
||||
elseif(CTEST_CONFIGURATION_TYPE MATCHES "^([Rr][Ee][Ll][Ww][Ii][Tt][Hh][Dd][Ee][Bb][Ii][Nn][Ff][Oo])$")
|
||||
add_test(example_run "C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/example/RelWithDebInfo/example.exe")
|
||||
set_tests_properties(example_run PROPERTIES DISABLED "TRUE" _BACKTRACE_TRIPLES "C:/Users/mbusc/source/repos/privatebin-cpp/tests/CMakeLists.txt;44;add_test;C:/Users/mbusc/source/repos/privatebin-cpp/tests/CMakeLists.txt;0;")
|
||||
else()
|
||||
add_test(example_run NOT_AVAILABLE)
|
||||
endif()
|
||||
209
build-clang/tests/INSTALL.vcxproj
Normal file
209
build-clang/tests/INSTALL.vcxproj
Normal file
@ -0,0 +1,209 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="17.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="MinSizeRel|x64">
|
||||
<Configuration>MinSizeRel</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="RelWithDebInfo|x64">
|
||||
<Configuration>RelWithDebInfo</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{9CA73C8F-0AB5-34C6-92C0-0C6A30C28CE5}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<WindowsTargetPlatformVersion>10.0.26100.0</WindowsTargetPlatformVersion>
|
||||
<Platform>x64</Platform>
|
||||
<ProjectName>INSTALL</ProjectName>
|
||||
<VCProjectUpgraderObjectName>NoUpgrade</VCProjectUpgraderObjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Utility</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>ClangCL</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Utility</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>ClangCL</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'" Label="Configuration">
|
||||
<ConfigurationType>Utility</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>ClangCL</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'" Label="Configuration">
|
||||
<ConfigurationType>Utility</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>ClangCL</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.20506.1</_ProjectFileVersion>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<PostBuildEvent>
|
||||
<UseUtf8Encoding>Always</UseUtf8Encoding>
|
||||
<Message></Message>
|
||||
<Command>setlocal
|
||||
"C:\Program Files\CMake\bin\cmake.exe" -DBUILD_TYPE=$(Configuration) -P cmake_install.cmake
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<PostBuildEvent>
|
||||
<UseUtf8Encoding>Always</UseUtf8Encoding>
|
||||
<Message></Message>
|
||||
<Command>setlocal
|
||||
"C:\Program Files\CMake\bin\cmake.exe" -DBUILD_TYPE=$(Configuration) -P cmake_install.cmake
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">
|
||||
<PostBuildEvent>
|
||||
<UseUtf8Encoding>Always</UseUtf8Encoding>
|
||||
<Message></Message>
|
||||
<Command>setlocal
|
||||
"C:\Program Files\CMake\bin\cmake.exe" -DBUILD_TYPE=$(Configuration) -P cmake_install.cmake
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">
|
||||
<PostBuildEvent>
|
||||
<UseUtf8Encoding>Always</UseUtf8Encoding>
|
||||
<Message></Message>
|
||||
<Command>setlocal
|
||||
"C:\Program Files\CMake\bin\cmake.exe" -DBUILD_TYPE=$(Configuration) -P cmake_install.cmake
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\CMakeFiles\5f91952c11fa596c0c9b82c0230126b2\INSTALL_force.rule">
|
||||
<BuildInParallel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</BuildInParallel>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> </Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">setlocal
|
||||
cd .
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\tests\CMakeFiles\INSTALL_force</Outputs>
|
||||
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkObjects>
|
||||
<VerifyInputsAndOutputsExist Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</VerifyInputsAndOutputsExist>
|
||||
<BuildInParallel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</BuildInParallel>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> </Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">setlocal
|
||||
cd .
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\tests\CMakeFiles\INSTALL_force</Outputs>
|
||||
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkObjects>
|
||||
<VerifyInputsAndOutputsExist Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</VerifyInputsAndOutputsExist>
|
||||
<BuildInParallel Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">true</BuildInParallel>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'"> </Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">setlocal
|
||||
cd .
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\tests\CMakeFiles\INSTALL_force</Outputs>
|
||||
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">false</LinkObjects>
|
||||
<VerifyInputsAndOutputsExist Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">false</VerifyInputsAndOutputsExist>
|
||||
<BuildInParallel Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">true</BuildInParallel>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'"> </Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">setlocal
|
||||
cd .
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\tests\CMakeFiles\INSTALL_force</Outputs>
|
||||
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">false</LinkObjects>
|
||||
<VerifyInputsAndOutputsExist Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">false</VerifyInputsAndOutputsExist>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\ZERO_CHECK.vcxproj">
|
||||
<Project>{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}</Project>
|
||||
<Name>ZERO_CHECK</Name>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\tests\ALL_BUILD.vcxproj">
|
||||
<Project>{A12920FA-3DF1-3286-B224-DA3DB7CD3B92}</Project>
|
||||
<Name>ALL_BUILD</Name>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
13
build-clang/tests/INSTALL.vcxproj.filters
Normal file
13
build-clang/tests/INSTALL.vcxproj.filters
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="17.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\CMakeFiles\5f91952c11fa596c0c9b82c0230126b2\INSTALL_force.rule">
|
||||
<Filter>CMake Rules</Filter>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="CMake Rules">
|
||||
<UniqueIdentifier>{A99DCD01-F97E-3DBB-AE0A-A36B621FE04A}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
90
build-clang/tests/LibPrivateBinTests.sln
Normal file
90
build-clang/tests/LibPrivateBinTests.sln
Normal file
@ -0,0 +1,90 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ALL_BUILD", "ALL_BUILD.vcxproj", "{A12920FA-3DF1-3286-B224-DA3DB7CD3B92}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF} = {0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}
|
||||
{C3F88C47-123F-3064-9A29-E5E341930946} = {C3F88C47-123F-3064-9A29-E5E341930946}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "INSTALL", "INSTALL.vcxproj", "{9CA73C8F-0AB5-34C6-92C0-0C6A30C28CE5}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{A12920FA-3DF1-3286-B224-DA3DB7CD3B92} = {A12920FA-3DF1-3286-B224-DA3DB7CD3B92}
|
||||
{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF} = {0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RUN_TESTS", "RUN_TESTS.vcxproj", "{6B00B4B4-FA49-3C0E-9E2B-A30BDF389AE5}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF} = {0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZERO_CHECK", "..\\ZERO_CHECK.vcxproj", "{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libprivatebin", "..\\libprivatebin.vcxproj", "{F7375EBF-3777-35B1-B163-0BF71FADB554}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF} = {0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_basic", "test_basic.vcxproj", "{C3F88C47-123F-3064-9A29-E5E341930946}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF} = {0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}
|
||||
{F7375EBF-3777-35B1-B163-0BF71FADB554} = {F7375EBF-3777-35B1-B163-0BF71FADB554}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
Release|x64 = Release|x64
|
||||
MinSizeRel|x64 = MinSizeRel|x64
|
||||
RelWithDebInfo|x64 = RelWithDebInfo|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{A12920FA-3DF1-3286-B224-DA3DB7CD3B92}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{A12920FA-3DF1-3286-B224-DA3DB7CD3B92}.Debug|x64.Build.0 = Debug|x64
|
||||
{A12920FA-3DF1-3286-B224-DA3DB7CD3B92}.Release|x64.ActiveCfg = Release|x64
|
||||
{A12920FA-3DF1-3286-B224-DA3DB7CD3B92}.Release|x64.Build.0 = Release|x64
|
||||
{A12920FA-3DF1-3286-B224-DA3DB7CD3B92}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64
|
||||
{A12920FA-3DF1-3286-B224-DA3DB7CD3B92}.MinSizeRel|x64.Build.0 = MinSizeRel|x64
|
||||
{A12920FA-3DF1-3286-B224-DA3DB7CD3B92}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
|
||||
{A12920FA-3DF1-3286-B224-DA3DB7CD3B92}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
|
||||
{9CA73C8F-0AB5-34C6-92C0-0C6A30C28CE5}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{9CA73C8F-0AB5-34C6-92C0-0C6A30C28CE5}.Release|x64.ActiveCfg = Release|x64
|
||||
{9CA73C8F-0AB5-34C6-92C0-0C6A30C28CE5}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64
|
||||
{9CA73C8F-0AB5-34C6-92C0-0C6A30C28CE5}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
|
||||
{6B00B4B4-FA49-3C0E-9E2B-A30BDF389AE5}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{6B00B4B4-FA49-3C0E-9E2B-A30BDF389AE5}.Release|x64.ActiveCfg = Release|x64
|
||||
{6B00B4B4-FA49-3C0E-9E2B-A30BDF389AE5}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64
|
||||
{6B00B4B4-FA49-3C0E-9E2B-A30BDF389AE5}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
|
||||
{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}.Debug|x64.Build.0 = Debug|x64
|
||||
{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}.Release|x64.ActiveCfg = Release|x64
|
||||
{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}.Release|x64.Build.0 = Release|x64
|
||||
{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64
|
||||
{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}.MinSizeRel|x64.Build.0 = MinSizeRel|x64
|
||||
{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
|
||||
{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
|
||||
{F7375EBF-3777-35B1-B163-0BF71FADB554}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{F7375EBF-3777-35B1-B163-0BF71FADB554}.Debug|x64.Build.0 = Debug|x64
|
||||
{F7375EBF-3777-35B1-B163-0BF71FADB554}.Release|x64.ActiveCfg = Release|x64
|
||||
{F7375EBF-3777-35B1-B163-0BF71FADB554}.Release|x64.Build.0 = Release|x64
|
||||
{F7375EBF-3777-35B1-B163-0BF71FADB554}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64
|
||||
{F7375EBF-3777-35B1-B163-0BF71FADB554}.MinSizeRel|x64.Build.0 = MinSizeRel|x64
|
||||
{F7375EBF-3777-35B1-B163-0BF71FADB554}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
|
||||
{F7375EBF-3777-35B1-B163-0BF71FADB554}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
|
||||
{C3F88C47-123F-3064-9A29-E5E341930946}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{C3F88C47-123F-3064-9A29-E5E341930946}.Debug|x64.Build.0 = Debug|x64
|
||||
{C3F88C47-123F-3064-9A29-E5E341930946}.Release|x64.ActiveCfg = Release|x64
|
||||
{C3F88C47-123F-3064-9A29-E5E341930946}.Release|x64.Build.0 = Release|x64
|
||||
{C3F88C47-123F-3064-9A29-E5E341930946}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64
|
||||
{C3F88C47-123F-3064-9A29-E5E341930946}.MinSizeRel|x64.Build.0 = MinSizeRel|x64
|
||||
{C3F88C47-123F-3064-9A29-E5E341930946}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
|
||||
{C3F88C47-123F-3064-9A29-E5E341930946}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {81547BE2-276A-31D5-AF01-AEF71A266D98}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityAddIns) = postSolution
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
199
build-clang/tests/RUN_TESTS.vcxproj
Normal file
199
build-clang/tests/RUN_TESTS.vcxproj
Normal file
@ -0,0 +1,199 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="17.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="MinSizeRel|x64">
|
||||
<Configuration>MinSizeRel</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="RelWithDebInfo|x64">
|
||||
<Configuration>RelWithDebInfo</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{6B00B4B4-FA49-3C0E-9E2B-A30BDF389AE5}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<WindowsTargetPlatformVersion>10.0.26100.0</WindowsTargetPlatformVersion>
|
||||
<Platform>x64</Platform>
|
||||
<ProjectName>RUN_TESTS</ProjectName>
|
||||
<VCProjectUpgraderObjectName>NoUpgrade</VCProjectUpgraderObjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Utility</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>ClangCL</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Utility</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>ClangCL</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'" Label="Configuration">
|
||||
<ConfigurationType>Utility</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>ClangCL</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'" Label="Configuration">
|
||||
<ConfigurationType>Utility</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>ClangCL</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.20506.1</_ProjectFileVersion>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<PostBuildEvent>
|
||||
<Message></Message>
|
||||
<Command>setlocal
|
||||
"C:\Program Files\CMake\bin\ctest.exe" -C $(Configuration)
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<PostBuildEvent>
|
||||
<Message></Message>
|
||||
<Command>setlocal
|
||||
"C:\Program Files\CMake\bin\ctest.exe" -C $(Configuration)
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">
|
||||
<PostBuildEvent>
|
||||
<Message></Message>
|
||||
<Command>setlocal
|
||||
"C:\Program Files\CMake\bin\ctest.exe" -C $(Configuration)
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">
|
||||
<PostBuildEvent>
|
||||
<Message></Message>
|
||||
<Command>setlocal
|
||||
"C:\Program Files\CMake\bin\ctest.exe" -C $(Configuration)
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\CMakeFiles\5f91952c11fa596c0c9b82c0230126b2\RUN_TESTS_force.rule">
|
||||
<BuildInParallel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</BuildInParallel>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> </Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">setlocal
|
||||
cd .
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\tests\CMakeFiles\RUN_TESTS_force</Outputs>
|
||||
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkObjects>
|
||||
<VerifyInputsAndOutputsExist Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</VerifyInputsAndOutputsExist>
|
||||
<BuildInParallel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</BuildInParallel>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> </Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">setlocal
|
||||
cd .
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\tests\CMakeFiles\RUN_TESTS_force</Outputs>
|
||||
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkObjects>
|
||||
<VerifyInputsAndOutputsExist Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</VerifyInputsAndOutputsExist>
|
||||
<BuildInParallel Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">true</BuildInParallel>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'"> </Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">setlocal
|
||||
cd .
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\tests\CMakeFiles\RUN_TESTS_force</Outputs>
|
||||
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">false</LinkObjects>
|
||||
<VerifyInputsAndOutputsExist Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">false</VerifyInputsAndOutputsExist>
|
||||
<BuildInParallel Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">true</BuildInParallel>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'"> </Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">setlocal
|
||||
cd .
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\tests\CMakeFiles\RUN_TESTS_force</Outputs>
|
||||
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">false</LinkObjects>
|
||||
<VerifyInputsAndOutputsExist Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">false</VerifyInputsAndOutputsExist>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\ZERO_CHECK.vcxproj">
|
||||
<Project>{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}</Project>
|
||||
<Name>ZERO_CHECK</Name>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
13
build-clang/tests/RUN_TESTS.vcxproj.filters
Normal file
13
build-clang/tests/RUN_TESTS.vcxproj.filters
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="17.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\CMakeFiles\5f91952c11fa596c0c9b82c0230126b2\RUN_TESTS_force.rule">
|
||||
<Filter>CMake Rules</Filter>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="CMake Rules">
|
||||
<UniqueIdentifier>{A99DCD01-F97E-3DBB-AE0A-A36B621FE04A}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
474
build-clang/tests/test_basic.vcxproj
Normal file
474
build-clang/tests/test_basic.vcxproj
Normal file
@ -0,0 +1,474 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="17.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="MinSizeRel|x64">
|
||||
<Configuration>MinSizeRel</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="RelWithDebInfo|x64">
|
||||
<Configuration>RelWithDebInfo</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{C3F88C47-123F-3064-9A29-E5E341930946}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<VcpkgEnabled>false</VcpkgEnabled>
|
||||
<WindowsTargetPlatformVersion>10.0.26100.0</WindowsTargetPlatformVersion>
|
||||
<Platform>x64</Platform>
|
||||
<ProjectName>test_basic</ProjectName>
|
||||
<VCProjectUpgraderObjectName>NoUpgrade</VCProjectUpgraderObjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>ClangCL</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>ClangCL</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>ClangCL</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>ClangCL</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="do_not_import_user.props" Condition="exists('do_not_import_user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.20506.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\tests\Debug\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">test_basic.dir\Debug\</IntDir>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">test_basic</TargetName>
|
||||
<TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.exe</TargetExt>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
|
||||
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</GenerateManifest>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\tests\Release\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">test_basic.dir\Release\</IntDir>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">test_basic</TargetName>
|
||||
<TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.exe</TargetExt>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
|
||||
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</GenerateManifest>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\tests\MinSizeRel\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">test_basic.dir\MinSizeRel\</IntDir>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">test_basic</TargetName>
|
||||
<TargetExt Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">.exe</TargetExt>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">false</LinkIncremental>
|
||||
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">true</GenerateManifest>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\tests\RelWithDebInfo\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">test_basic.dir\RelWithDebInfo\</IntDir>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">test_basic</TargetName>
|
||||
<TargetExt Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">.exe</TargetExt>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">true</LinkIncremental>
|
||||
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">true</GenerateManifest>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>C:\Users\mbusc\source\repos\privatebin-cpp\tests\..\include;C:\Users\mbusc\source\repos\privatebin-cpp\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalOptions>%(AdditionalOptions) -imsvc "C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/vcpkg_installed/x64-windows/include" -fprofile-instr-generate -fcoverage-mapping</AdditionalOptions>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<ExceptionHandling>Sync</ExceptionHandling>
|
||||
<ForceConformanceInForLoopScope></ForceConformanceInForLoopScope>
|
||||
<InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<MinimalRebuild></MinimalRebuild>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<RemoveUnreferencedCodeData></RemoveUnreferencedCodeData>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<SupportJustMyCode></SupportJustMyCode>
|
||||
<TreatWChar_tAsBuiltInType></TreatWChar_tAsBuiltInType>
|
||||
<UseFullPaths>false</UseFullPaths>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32;_WINDOWS;WINDOWS;CRYPTOPP_INCLUDE_PREFIX=cryptopp;CMAKE_INTDIR="Debug"</PreprocessorDefinitions>
|
||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||
<ScanSourceForModuleDependencies>false</ScanSourceForModuleDependencies>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32;_DEBUG;_WINDOWS;WINDOWS;CRYPTOPP_INCLUDE_PREFIX=cryptopp;CMAKE_INTDIR=\"Debug\"</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>C:\Users\mbusc\source\repos\privatebin-cpp\tests\..\include;C:\Users\mbusc\source\repos\privatebin-cpp\include;C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\vcpkg_installed\x64-windows\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<Midl>
|
||||
<AdditionalIncludeDirectories>C:\Users\mbusc\source\repos\privatebin-cpp\tests\..\include;C:\Users\mbusc\source\repos\privatebin-cpp\include;C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\vcpkg_installed\x64-windows\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<OutputDirectory>$(ProjectDir)/$(IntDir)</OutputDirectory>
|
||||
<HeaderFileName>%(Filename).h</HeaderFileName>
|
||||
<TypeLibraryName>%(Filename).tlb</TypeLibraryName>
|
||||
<InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
|
||||
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
|
||||
</Midl>
|
||||
<PostBuildEvent>
|
||||
<Message> </Message>
|
||||
<Command>setlocal
|
||||
"C:\Program Files\PowerShell\7\pwsh.exe" -noprofile -executionpolicy Bypass -file C:/Users/mbusc/vcpkg/scripts/buildsystems/msbuild/applocal.ps1 -targetBinary C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/tests/Debug/test_basic.exe -installedDir C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/vcpkg_installed/x64-windows/debug/bin -OutVariable out
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd
|
||||
setlocal
|
||||
"C:\Program Files\CMake\bin\cmake.exe" -E copy_if_different C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/Debug/libprivatebin.dll C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/tests/Debug
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
</PostBuildEvent>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\Debug\libprivatebin.lib;..\vcpkg_installed\x64-windows\debug\lib\cryptopp.lib;winhttp.lib;kernel32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalOptions>%(AdditionalOptions) /machine:x64</AdditionalOptions>
|
||||
<DataExecutionPrevention></DataExecutionPrevention>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<ImageHasSafeExceptionHandlers></ImageHasSafeExceptionHandlers>
|
||||
<ImportLibrary>C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/tests/Debug/test_basic.lib</ImportLibrary>
|
||||
<LinkErrorReporting></LinkErrorReporting>
|
||||
<ProgramDataBaseFile>C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/tests/Debug/test_basic.pdb</ProgramDataBaseFile>
|
||||
<RandomizedBaseAddress></RandomizedBaseAddress>
|
||||
<SubSystem>Console</SubSystem>
|
||||
</Link>
|
||||
<ProjectReference>
|
||||
<LinkLibraryDependencies>false</LinkLibraryDependencies>
|
||||
</ProjectReference>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>C:\Users\mbusc\source\repos\privatebin-cpp\tests\..\include;C:\Users\mbusc\source\repos\privatebin-cpp\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalOptions>%(AdditionalOptions) -imsvc "C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/vcpkg_installed/x64-windows/include" -fprofile-instr-generate -fcoverage-mapping</AdditionalOptions>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<ExceptionHandling>Sync</ExceptionHandling>
|
||||
<ForceConformanceInForLoopScope></ForceConformanceInForLoopScope>
|
||||
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<MinimalRebuild></MinimalRebuild>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<RemoveUnreferencedCodeData></RemoveUnreferencedCodeData>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<SupportJustMyCode></SupportJustMyCode>
|
||||
<TreatWChar_tAsBuiltInType></TreatWChar_tAsBuiltInType>
|
||||
<UseFullPaths>false</UseFullPaths>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;WINDOWS;CRYPTOPP_INCLUDE_PREFIX=cryptopp;CMAKE_INTDIR="Release"</PreprocessorDefinitions>
|
||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||
<DebugInformationFormat>
|
||||
</DebugInformationFormat>
|
||||
<ScanSourceForModuleDependencies>false</ScanSourceForModuleDependencies>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;WINDOWS;CRYPTOPP_INCLUDE_PREFIX=cryptopp;CMAKE_INTDIR=\"Release\"</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>C:\Users\mbusc\source\repos\privatebin-cpp\tests\..\include;C:\Users\mbusc\source\repos\privatebin-cpp\include;C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\vcpkg_installed\x64-windows\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<Midl>
|
||||
<AdditionalIncludeDirectories>C:\Users\mbusc\source\repos\privatebin-cpp\tests\..\include;C:\Users\mbusc\source\repos\privatebin-cpp\include;C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\vcpkg_installed\x64-windows\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<OutputDirectory>$(ProjectDir)/$(IntDir)</OutputDirectory>
|
||||
<HeaderFileName>%(Filename).h</HeaderFileName>
|
||||
<TypeLibraryName>%(Filename).tlb</TypeLibraryName>
|
||||
<InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
|
||||
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
|
||||
</Midl>
|
||||
<PostBuildEvent>
|
||||
<Message> </Message>
|
||||
<Command>setlocal
|
||||
"C:\Program Files\PowerShell\7\pwsh.exe" -noprofile -executionpolicy Bypass -file C:/Users/mbusc/vcpkg/scripts/buildsystems/msbuild/applocal.ps1 -targetBinary C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/tests/Release/test_basic.exe -installedDir C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/vcpkg_installed/x64-windows/bin -OutVariable out
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd
|
||||
setlocal
|
||||
"C:\Program Files\CMake\bin\cmake.exe" -E copy_if_different C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/Release/libprivatebin.dll C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/tests/Release
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
</PostBuildEvent>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\Release\libprivatebin.lib;..\vcpkg_installed\x64-windows\lib\cryptopp.lib;winhttp.lib;kernel32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalOptions>%(AdditionalOptions) /machine:x64</AdditionalOptions>
|
||||
<DataExecutionPrevention></DataExecutionPrevention>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<ImageHasSafeExceptionHandlers></ImageHasSafeExceptionHandlers>
|
||||
<ImportLibrary>C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/tests/Release/test_basic.lib</ImportLibrary>
|
||||
<LinkErrorReporting></LinkErrorReporting>
|
||||
<ProgramDataBaseFile>C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/tests/Release/test_basic.pdb</ProgramDataBaseFile>
|
||||
<RandomizedBaseAddress></RandomizedBaseAddress>
|
||||
<SubSystem>Console</SubSystem>
|
||||
</Link>
|
||||
<ProjectReference>
|
||||
<LinkLibraryDependencies>false</LinkLibraryDependencies>
|
||||
</ProjectReference>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>C:\Users\mbusc\source\repos\privatebin-cpp\tests\..\include;C:\Users\mbusc\source\repos\privatebin-cpp\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalOptions>%(AdditionalOptions) -imsvc "C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/vcpkg_installed/x64-windows/include" -fprofile-instr-generate -fcoverage-mapping</AdditionalOptions>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<ExceptionHandling>Sync</ExceptionHandling>
|
||||
<ForceConformanceInForLoopScope></ForceConformanceInForLoopScope>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<MinimalRebuild></MinimalRebuild>
|
||||
<Optimization>MinSpace</Optimization>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<RemoveUnreferencedCodeData></RemoveUnreferencedCodeData>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<SupportJustMyCode></SupportJustMyCode>
|
||||
<TreatWChar_tAsBuiltInType></TreatWChar_tAsBuiltInType>
|
||||
<UseFullPaths>false</UseFullPaths>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;WINDOWS;CRYPTOPP_INCLUDE_PREFIX=cryptopp;CMAKE_INTDIR="MinSizeRel"</PreprocessorDefinitions>
|
||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||
<DebugInformationFormat>
|
||||
</DebugInformationFormat>
|
||||
<ScanSourceForModuleDependencies>false</ScanSourceForModuleDependencies>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;WINDOWS;CRYPTOPP_INCLUDE_PREFIX=cryptopp;CMAKE_INTDIR=\"MinSizeRel\"</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>C:\Users\mbusc\source\repos\privatebin-cpp\tests\..\include;C:\Users\mbusc\source\repos\privatebin-cpp\include;C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\vcpkg_installed\x64-windows\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<Midl>
|
||||
<AdditionalIncludeDirectories>C:\Users\mbusc\source\repos\privatebin-cpp\tests\..\include;C:\Users\mbusc\source\repos\privatebin-cpp\include;C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\vcpkg_installed\x64-windows\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<OutputDirectory>$(ProjectDir)/$(IntDir)</OutputDirectory>
|
||||
<HeaderFileName>%(Filename).h</HeaderFileName>
|
||||
<TypeLibraryName>%(Filename).tlb</TypeLibraryName>
|
||||
<InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
|
||||
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
|
||||
</Midl>
|
||||
<PostBuildEvent>
|
||||
<Message> </Message>
|
||||
<Command>setlocal
|
||||
"C:\Program Files\PowerShell\7\pwsh.exe" -noprofile -executionpolicy Bypass -file C:/Users/mbusc/vcpkg/scripts/buildsystems/msbuild/applocal.ps1 -targetBinary C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/tests/MinSizeRel/test_basic.exe -installedDir C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/vcpkg_installed/x64-windows/bin -OutVariable out
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd
|
||||
setlocal
|
||||
"C:\Program Files\CMake\bin\cmake.exe" -E copy_if_different C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/MinSizeRel/libprivatebin.dll C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/tests/MinSizeRel
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
</PostBuildEvent>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\MinSizeRel\libprivatebin.lib;..\vcpkg_installed\x64-windows\lib\cryptopp.lib;winhttp.lib;kernel32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalOptions>%(AdditionalOptions) /machine:x64</AdditionalOptions>
|
||||
<DataExecutionPrevention></DataExecutionPrevention>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<ImageHasSafeExceptionHandlers></ImageHasSafeExceptionHandlers>
|
||||
<ImportLibrary>C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/tests/MinSizeRel/test_basic.lib</ImportLibrary>
|
||||
<LinkErrorReporting></LinkErrorReporting>
|
||||
<ProgramDataBaseFile>C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/tests/MinSizeRel/test_basic.pdb</ProgramDataBaseFile>
|
||||
<RandomizedBaseAddress></RandomizedBaseAddress>
|
||||
<SubSystem>Console</SubSystem>
|
||||
</Link>
|
||||
<ProjectReference>
|
||||
<LinkLibraryDependencies>false</LinkLibraryDependencies>
|
||||
</ProjectReference>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>C:\Users\mbusc\source\repos\privatebin-cpp\tests\..\include;C:\Users\mbusc\source\repos\privatebin-cpp\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalOptions>%(AdditionalOptions) -imsvc "C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/vcpkg_installed/x64-windows/include" -fprofile-instr-generate -fcoverage-mapping</AdditionalOptions>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<ExceptionHandling>Sync</ExceptionHandling>
|
||||
<ForceConformanceInForLoopScope></ForceConformanceInForLoopScope>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<MinimalRebuild></MinimalRebuild>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<RemoveUnreferencedCodeData></RemoveUnreferencedCodeData>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<SupportJustMyCode></SupportJustMyCode>
|
||||
<TreatWChar_tAsBuiltInType></TreatWChar_tAsBuiltInType>
|
||||
<UseFullPaths>false</UseFullPaths>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;WINDOWS;CRYPTOPP_INCLUDE_PREFIX=cryptopp;CMAKE_INTDIR="RelWithDebInfo"</PreprocessorDefinitions>
|
||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||
<ScanSourceForModuleDependencies>false</ScanSourceForModuleDependencies>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;WINDOWS;CRYPTOPP_INCLUDE_PREFIX=cryptopp;CMAKE_INTDIR=\"RelWithDebInfo\"</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>C:\Users\mbusc\source\repos\privatebin-cpp\tests\..\include;C:\Users\mbusc\source\repos\privatebin-cpp\include;C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\vcpkg_installed\x64-windows\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<Midl>
|
||||
<AdditionalIncludeDirectories>C:\Users\mbusc\source\repos\privatebin-cpp\tests\..\include;C:\Users\mbusc\source\repos\privatebin-cpp\include;C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\vcpkg_installed\x64-windows\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<OutputDirectory>$(ProjectDir)/$(IntDir)</OutputDirectory>
|
||||
<HeaderFileName>%(Filename).h</HeaderFileName>
|
||||
<TypeLibraryName>%(Filename).tlb</TypeLibraryName>
|
||||
<InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
|
||||
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
|
||||
</Midl>
|
||||
<PostBuildEvent>
|
||||
<Message> </Message>
|
||||
<Command>setlocal
|
||||
"C:\Program Files\PowerShell\7\pwsh.exe" -noprofile -executionpolicy Bypass -file C:/Users/mbusc/vcpkg/scripts/buildsystems/msbuild/applocal.ps1 -targetBinary C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/tests/RelWithDebInfo/test_basic.exe -installedDir C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/vcpkg_installed/x64-windows/bin -OutVariable out
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd
|
||||
setlocal
|
||||
"C:\Program Files\CMake\bin\cmake.exe" -E copy_if_different C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/RelWithDebInfo/libprivatebin.dll C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/tests/RelWithDebInfo
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
</PostBuildEvent>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\RelWithDebInfo\libprivatebin.lib;..\vcpkg_installed\x64-windows\lib\cryptopp.lib;winhttp.lib;kernel32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalOptions>%(AdditionalOptions) /machine:x64</AdditionalOptions>
|
||||
<DataExecutionPrevention></DataExecutionPrevention>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<ImageHasSafeExceptionHandlers></ImageHasSafeExceptionHandlers>
|
||||
<ImportLibrary>C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/tests/RelWithDebInfo/test_basic.lib</ImportLibrary>
|
||||
<LinkErrorReporting></LinkErrorReporting>
|
||||
<ProgramDataBaseFile>C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/tests/RelWithDebInfo/test_basic.pdb</ProgramDataBaseFile>
|
||||
<RandomizedBaseAddress></RandomizedBaseAddress>
|
||||
<SubSystem>Console</SubSystem>
|
||||
</Link>
|
||||
<ProjectReference>
|
||||
<LinkLibraryDependencies>false</LinkLibraryDependencies>
|
||||
</ProjectReference>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="C:\Users\mbusc\source\repos\privatebin-cpp\tests\CMakeLists.txt">
|
||||
<UseUtf8Encoding>Always</UseUtf8Encoding>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Building Custom Rule C:/Users/mbusc/source/repos/privatebin-cpp/tests/CMakeLists.txt</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">setlocal
|
||||
"C:\Program Files\CMake\bin\cmake.exe" -SC:/Users/mbusc/source/repos/privatebin-cpp -BC:/Users/mbusc/source/repos/privatebin-cpp/build-clang --check-stamp-file C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/tests/CMakeFiles/generate.stamp
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\tests\CMakeFiles\generate.stamp</Outputs>
|
||||
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkObjects>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Building Custom Rule C:/Users/mbusc/source/repos/privatebin-cpp/tests/CMakeLists.txt</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">setlocal
|
||||
"C:\Program Files\CMake\bin\cmake.exe" -SC:/Users/mbusc/source/repos/privatebin-cpp -BC:/Users/mbusc/source/repos/privatebin-cpp/build-clang --check-stamp-file C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/tests/CMakeFiles/generate.stamp
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\tests\CMakeFiles\generate.stamp</Outputs>
|
||||
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkObjects>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">Building Custom Rule C:/Users/mbusc/source/repos/privatebin-cpp/tests/CMakeLists.txt</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">setlocal
|
||||
"C:\Program Files\CMake\bin\cmake.exe" -SC:/Users/mbusc/source/repos/privatebin-cpp -BC:/Users/mbusc/source/repos/privatebin-cpp/build-clang --check-stamp-file C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/tests/CMakeFiles/generate.stamp
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\tests\CMakeFiles\generate.stamp</Outputs>
|
||||
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">false</LinkObjects>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">Building Custom Rule C:/Users/mbusc/source/repos/privatebin-cpp/tests/CMakeLists.txt</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">setlocal
|
||||
"C:\Program Files\CMake\bin\cmake.exe" -SC:/Users/mbusc/source/repos/privatebin-cpp -BC:/Users/mbusc/source/repos/privatebin-cpp/build-clang --check-stamp-file C:/Users/mbusc/source/repos/privatebin-cpp/build-clang/tests/CMakeFiles/generate.stamp
|
||||
if %errorlevel% neq 0 goto :cmEnd
|
||||
:cmEnd
|
||||
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||
:cmErrorLevel
|
||||
exit /b %1
|
||||
:cmDone
|
||||
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\tests\CMakeFiles\generate.stamp</Outputs>
|
||||
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">false</LinkObjects>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="C:\Users\mbusc\source\repos\privatebin-cpp\tests\test_basic.cpp" />
|
||||
<ClCompile Include="C:\Users\mbusc\source\repos\privatebin-cpp\src\json_parser.cpp" />
|
||||
<ClCompile Include="C:\Users\mbusc\source\repos\privatebin-cpp\src\http_client.cpp" />
|
||||
<Natvis Include="C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\vcpkg_installed\x64-windows\share\nlohmann_json\nlohmann_json.natvis">
|
||||
</Natvis>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\ZERO_CHECK.vcxproj">
|
||||
<Project>{0A9A5E2C-B01B-3BE3-8627-86DE18DA5FEF}</Project>
|
||||
<Name>ZERO_CHECK</Name>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\libprivatebin.vcxproj">
|
||||
<Project>{F7375EBF-3777-35B1-B163-0BF71FADB554}</Project>
|
||||
<Name>libprivatebin</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
25
build-clang/tests/test_basic.vcxproj.filters
Normal file
25
build-clang/tests/test_basic.vcxproj.filters
Normal file
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="17.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<ClCompile Include="C:\Users\mbusc\source\repos\privatebin-cpp\tests\test_basic.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="C:\Users\mbusc\source\repos\privatebin-cpp\src\json_parser.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="C:\Users\mbusc\source\repos\privatebin-cpp\src\http_client.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="C:\Users\mbusc\source\repos\privatebin-cpp\tests\CMakeLists.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Natvis Include="C:\Users\mbusc\source\repos\privatebin-cpp\build-clang\vcpkg_installed\x64-windows\share\nlohmann_json\nlohmann_json.natvis" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{AE7BCFB5-08F5-3BD2-B8BD-53713BA5E6E6}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@ -0,0 +1,8 @@
|
||||
{
|
||||
"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.44.35207/bin/Hostx64/x64/cl.exe" :
|
||||
{
|
||||
"hash" : "3c62be3c178526242f2c45cf8ccbe3c55048a1a8",
|
||||
"size" : 677464,
|
||||
"timestamp" : 1756456390
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,210 @@
|
||||
x64-windows/
|
||||
x64-windows/debug/
|
||||
x64-windows/debug/lib/
|
||||
x64-windows/debug/lib/cryptopp.lib
|
||||
x64-windows/debug/lib/pkgconfig/
|
||||
x64-windows/debug/lib/pkgconfig/cryptopp.pc
|
||||
x64-windows/include/
|
||||
x64-windows/include/cryptopp/
|
||||
x64-windows/include/cryptopp/3way.h
|
||||
x64-windows/include/cryptopp/adler32.h
|
||||
x64-windows/include/cryptopp/adv_simd.h
|
||||
x64-windows/include/cryptopp/aes.h
|
||||
x64-windows/include/cryptopp/aes_armv4.h
|
||||
x64-windows/include/cryptopp/algebra.h
|
||||
x64-windows/include/cryptopp/algparam.h
|
||||
x64-windows/include/cryptopp/allocate.h
|
||||
x64-windows/include/cryptopp/arc4.h
|
||||
x64-windows/include/cryptopp/argnames.h
|
||||
x64-windows/include/cryptopp/aria.h
|
||||
x64-windows/include/cryptopp/arm_simd.h
|
||||
x64-windows/include/cryptopp/asn.h
|
||||
x64-windows/include/cryptopp/authenc.h
|
||||
x64-windows/include/cryptopp/base32.h
|
||||
x64-windows/include/cryptopp/base64.h
|
||||
x64-windows/include/cryptopp/basecode.h
|
||||
x64-windows/include/cryptopp/blake2.h
|
||||
x64-windows/include/cryptopp/blowfish.h
|
||||
x64-windows/include/cryptopp/blumshub.h
|
||||
x64-windows/include/cryptopp/camellia.h
|
||||
x64-windows/include/cryptopp/cast.h
|
||||
x64-windows/include/cryptopp/cbcmac.h
|
||||
x64-windows/include/cryptopp/ccm.h
|
||||
x64-windows/include/cryptopp/chacha.h
|
||||
x64-windows/include/cryptopp/chachapoly.h
|
||||
x64-windows/include/cryptopp/cham.h
|
||||
x64-windows/include/cryptopp/channels.h
|
||||
x64-windows/include/cryptopp/cmac.h
|
||||
x64-windows/include/cryptopp/config.h
|
||||
x64-windows/include/cryptopp/config_align.h
|
||||
x64-windows/include/cryptopp/config_asm.h
|
||||
x64-windows/include/cryptopp/config_cpu.h
|
||||
x64-windows/include/cryptopp/config_cxx.h
|
||||
x64-windows/include/cryptopp/config_dll.h
|
||||
x64-windows/include/cryptopp/config_int.h
|
||||
x64-windows/include/cryptopp/config_misc.h
|
||||
x64-windows/include/cryptopp/config_ns.h
|
||||
x64-windows/include/cryptopp/config_os.h
|
||||
x64-windows/include/cryptopp/config_ver.h
|
||||
x64-windows/include/cryptopp/cpu.h
|
||||
x64-windows/include/cryptopp/crc.h
|
||||
x64-windows/include/cryptopp/cryptlib.h
|
||||
x64-windows/include/cryptopp/darn.h
|
||||
x64-windows/include/cryptopp/default.h
|
||||
x64-windows/include/cryptopp/des.h
|
||||
x64-windows/include/cryptopp/dh.h
|
||||
x64-windows/include/cryptopp/dh2.h
|
||||
x64-windows/include/cryptopp/dll.h
|
||||
x64-windows/include/cryptopp/dmac.h
|
||||
x64-windows/include/cryptopp/donna.h
|
||||
x64-windows/include/cryptopp/donna_32.h
|
||||
x64-windows/include/cryptopp/donna_64.h
|
||||
x64-windows/include/cryptopp/donna_sse.h
|
||||
x64-windows/include/cryptopp/drbg.h
|
||||
x64-windows/include/cryptopp/dsa.h
|
||||
x64-windows/include/cryptopp/eax.h
|
||||
x64-windows/include/cryptopp/ec2n.h
|
||||
x64-windows/include/cryptopp/eccrypto.h
|
||||
x64-windows/include/cryptopp/ecp.h
|
||||
x64-windows/include/cryptopp/ecpoint.h
|
||||
x64-windows/include/cryptopp/elgamal.h
|
||||
x64-windows/include/cryptopp/emsa2.h
|
||||
x64-windows/include/cryptopp/eprecomp.h
|
||||
x64-windows/include/cryptopp/esign.h
|
||||
x64-windows/include/cryptopp/fhmqv.h
|
||||
x64-windows/include/cryptopp/files.h
|
||||
x64-windows/include/cryptopp/filters.h
|
||||
x64-windows/include/cryptopp/fips140.h
|
||||
x64-windows/include/cryptopp/fltrimpl.h
|
||||
x64-windows/include/cryptopp/gcm.h
|
||||
x64-windows/include/cryptopp/gf256.h
|
||||
x64-windows/include/cryptopp/gf2_32.h
|
||||
x64-windows/include/cryptopp/gf2n.h
|
||||
x64-windows/include/cryptopp/gfpcrypt.h
|
||||
x64-windows/include/cryptopp/gost.h
|
||||
x64-windows/include/cryptopp/gzip.h
|
||||
x64-windows/include/cryptopp/hashfwd.h
|
||||
x64-windows/include/cryptopp/hc128.h
|
||||
x64-windows/include/cryptopp/hc256.h
|
||||
x64-windows/include/cryptopp/hex.h
|
||||
x64-windows/include/cryptopp/hight.h
|
||||
x64-windows/include/cryptopp/hkdf.h
|
||||
x64-windows/include/cryptopp/hmac.h
|
||||
x64-windows/include/cryptopp/hmqv.h
|
||||
x64-windows/include/cryptopp/hrtimer.h
|
||||
x64-windows/include/cryptopp/ida.h
|
||||
x64-windows/include/cryptopp/idea.h
|
||||
x64-windows/include/cryptopp/integer.h
|
||||
x64-windows/include/cryptopp/iterhash.h
|
||||
x64-windows/include/cryptopp/kalyna.h
|
||||
x64-windows/include/cryptopp/keccak.h
|
||||
x64-windows/include/cryptopp/lea.h
|
||||
x64-windows/include/cryptopp/lsh.h
|
||||
x64-windows/include/cryptopp/lubyrack.h
|
||||
x64-windows/include/cryptopp/luc.h
|
||||
x64-windows/include/cryptopp/mars.h
|
||||
x64-windows/include/cryptopp/md2.h
|
||||
x64-windows/include/cryptopp/md4.h
|
||||
x64-windows/include/cryptopp/md5.h
|
||||
x64-windows/include/cryptopp/mdc.h
|
||||
x64-windows/include/cryptopp/mersenne.h
|
||||
x64-windows/include/cryptopp/misc.h
|
||||
x64-windows/include/cryptopp/modarith.h
|
||||
x64-windows/include/cryptopp/modes.h
|
||||
x64-windows/include/cryptopp/modexppc.h
|
||||
x64-windows/include/cryptopp/mqueue.h
|
||||
x64-windows/include/cryptopp/mqv.h
|
||||
x64-windows/include/cryptopp/naclite.h
|
||||
x64-windows/include/cryptopp/nbtheory.h
|
||||
x64-windows/include/cryptopp/nr.h
|
||||
x64-windows/include/cryptopp/oaep.h
|
||||
x64-windows/include/cryptopp/oids.h
|
||||
x64-windows/include/cryptopp/osrng.h
|
||||
x64-windows/include/cryptopp/ossig.h
|
||||
x64-windows/include/cryptopp/padlkrng.h
|
||||
x64-windows/include/cryptopp/panama.h
|
||||
x64-windows/include/cryptopp/pch.h
|
||||
x64-windows/include/cryptopp/pkcspad.h
|
||||
x64-windows/include/cryptopp/poly1305.h
|
||||
x64-windows/include/cryptopp/polynomi.h
|
||||
x64-windows/include/cryptopp/ppc_simd.h
|
||||
x64-windows/include/cryptopp/pssr.h
|
||||
x64-windows/include/cryptopp/pubkey.h
|
||||
x64-windows/include/cryptopp/pwdbased.h
|
||||
x64-windows/include/cryptopp/queue.h
|
||||
x64-windows/include/cryptopp/rabbit.h
|
||||
x64-windows/include/cryptopp/rabin.h
|
||||
x64-windows/include/cryptopp/randpool.h
|
||||
x64-windows/include/cryptopp/rc2.h
|
||||
x64-windows/include/cryptopp/rc5.h
|
||||
x64-windows/include/cryptopp/rc6.h
|
||||
x64-windows/include/cryptopp/rdrand.h
|
||||
x64-windows/include/cryptopp/rijndael.h
|
||||
x64-windows/include/cryptopp/ripemd.h
|
||||
x64-windows/include/cryptopp/rng.h
|
||||
x64-windows/include/cryptopp/rsa.h
|
||||
x64-windows/include/cryptopp/rw.h
|
||||
x64-windows/include/cryptopp/safer.h
|
||||
x64-windows/include/cryptopp/salsa.h
|
||||
x64-windows/include/cryptopp/scrypt.h
|
||||
x64-windows/include/cryptopp/seal.h
|
||||
x64-windows/include/cryptopp/secblock.h
|
||||
x64-windows/include/cryptopp/secblockfwd.h
|
||||
x64-windows/include/cryptopp/seckey.h
|
||||
x64-windows/include/cryptopp/seed.h
|
||||
x64-windows/include/cryptopp/serpent.h
|
||||
x64-windows/include/cryptopp/serpentp.h
|
||||
x64-windows/include/cryptopp/sha.h
|
||||
x64-windows/include/cryptopp/sha1_armv4.h
|
||||
x64-windows/include/cryptopp/sha256_armv4.h
|
||||
x64-windows/include/cryptopp/sha3.h
|
||||
x64-windows/include/cryptopp/sha512_armv4.h
|
||||
x64-windows/include/cryptopp/shacal2.h
|
||||
x64-windows/include/cryptopp/shake.h
|
||||
x64-windows/include/cryptopp/shark.h
|
||||
x64-windows/include/cryptopp/simeck.h
|
||||
x64-windows/include/cryptopp/simon.h
|
||||
x64-windows/include/cryptopp/simple.h
|
||||
x64-windows/include/cryptopp/siphash.h
|
||||
x64-windows/include/cryptopp/skipjack.h
|
||||
x64-windows/include/cryptopp/sm3.h
|
||||
x64-windows/include/cryptopp/sm4.h
|
||||
x64-windows/include/cryptopp/smartptr.h
|
||||
x64-windows/include/cryptopp/sosemanuk.h
|
||||
x64-windows/include/cryptopp/speck.h
|
||||
x64-windows/include/cryptopp/square.h
|
||||
x64-windows/include/cryptopp/stdcpp.h
|
||||
x64-windows/include/cryptopp/strciphr.h
|
||||
x64-windows/include/cryptopp/tea.h
|
||||
x64-windows/include/cryptopp/threefish.h
|
||||
x64-windows/include/cryptopp/tiger.h
|
||||
x64-windows/include/cryptopp/trap.h
|
||||
x64-windows/include/cryptopp/trunhash.h
|
||||
x64-windows/include/cryptopp/ttmac.h
|
||||
x64-windows/include/cryptopp/tweetnacl.h
|
||||
x64-windows/include/cryptopp/twofish.h
|
||||
x64-windows/include/cryptopp/vmac.h
|
||||
x64-windows/include/cryptopp/wake.h
|
||||
x64-windows/include/cryptopp/whrlpool.h
|
||||
x64-windows/include/cryptopp/words.h
|
||||
x64-windows/include/cryptopp/xed25519.h
|
||||
x64-windows/include/cryptopp/xtr.h
|
||||
x64-windows/include/cryptopp/xtrcrypt.h
|
||||
x64-windows/include/cryptopp/xts.h
|
||||
x64-windows/include/cryptopp/zdeflate.h
|
||||
x64-windows/include/cryptopp/zinflate.h
|
||||
x64-windows/include/cryptopp/zlib.h
|
||||
x64-windows/lib/
|
||||
x64-windows/lib/cryptopp.lib
|
||||
x64-windows/lib/pkgconfig/
|
||||
x64-windows/lib/pkgconfig/cryptopp.pc
|
||||
x64-windows/share/
|
||||
x64-windows/share/cryptopp/
|
||||
x64-windows/share/cryptopp/copyright
|
||||
x64-windows/share/cryptopp/cryptopp-static-targets-debug.cmake
|
||||
x64-windows/share/cryptopp/cryptopp-static-targets-release.cmake
|
||||
x64-windows/share/cryptopp/cryptopp-static-targets.cmake
|
||||
x64-windows/share/cryptopp/cryptoppConfig.cmake
|
||||
x64-windows/share/cryptopp/cryptoppConfigVersion.cmake
|
||||
x64-windows/share/cryptopp/vcpkg.spdx.json
|
||||
x64-windows/share/cryptopp/vcpkg_abi_info.txt
|
||||
@ -0,0 +1,71 @@
|
||||
x64-windows/
|
||||
x64-windows/include/
|
||||
x64-windows/include/nlohmann/
|
||||
x64-windows/include/nlohmann/adl_serializer.hpp
|
||||
x64-windows/include/nlohmann/byte_container_with_subtype.hpp
|
||||
x64-windows/include/nlohmann/detail/
|
||||
x64-windows/include/nlohmann/detail/abi_macros.hpp
|
||||
x64-windows/include/nlohmann/detail/conversions/
|
||||
x64-windows/include/nlohmann/detail/conversions/from_json.hpp
|
||||
x64-windows/include/nlohmann/detail/conversions/to_chars.hpp
|
||||
x64-windows/include/nlohmann/detail/conversions/to_json.hpp
|
||||
x64-windows/include/nlohmann/detail/exceptions.hpp
|
||||
x64-windows/include/nlohmann/detail/hash.hpp
|
||||
x64-windows/include/nlohmann/detail/input/
|
||||
x64-windows/include/nlohmann/detail/input/binary_reader.hpp
|
||||
x64-windows/include/nlohmann/detail/input/input_adapters.hpp
|
||||
x64-windows/include/nlohmann/detail/input/json_sax.hpp
|
||||
x64-windows/include/nlohmann/detail/input/lexer.hpp
|
||||
x64-windows/include/nlohmann/detail/input/parser.hpp
|
||||
x64-windows/include/nlohmann/detail/input/position_t.hpp
|
||||
x64-windows/include/nlohmann/detail/iterators/
|
||||
x64-windows/include/nlohmann/detail/iterators/internal_iterator.hpp
|
||||
x64-windows/include/nlohmann/detail/iterators/iter_impl.hpp
|
||||
x64-windows/include/nlohmann/detail/iterators/iteration_proxy.hpp
|
||||
x64-windows/include/nlohmann/detail/iterators/iterator_traits.hpp
|
||||
x64-windows/include/nlohmann/detail/iterators/json_reverse_iterator.hpp
|
||||
x64-windows/include/nlohmann/detail/iterators/primitive_iterator.hpp
|
||||
x64-windows/include/nlohmann/detail/json_custom_base_class.hpp
|
||||
x64-windows/include/nlohmann/detail/json_pointer.hpp
|
||||
x64-windows/include/nlohmann/detail/json_ref.hpp
|
||||
x64-windows/include/nlohmann/detail/macro_scope.hpp
|
||||
x64-windows/include/nlohmann/detail/macro_unscope.hpp
|
||||
x64-windows/include/nlohmann/detail/meta/
|
||||
x64-windows/include/nlohmann/detail/meta/call_std/
|
||||
x64-windows/include/nlohmann/detail/meta/call_std/begin.hpp
|
||||
x64-windows/include/nlohmann/detail/meta/call_std/end.hpp
|
||||
x64-windows/include/nlohmann/detail/meta/cpp_future.hpp
|
||||
x64-windows/include/nlohmann/detail/meta/detected.hpp
|
||||
x64-windows/include/nlohmann/detail/meta/identity_tag.hpp
|
||||
x64-windows/include/nlohmann/detail/meta/is_sax.hpp
|
||||
x64-windows/include/nlohmann/detail/meta/std_fs.hpp
|
||||
x64-windows/include/nlohmann/detail/meta/type_traits.hpp
|
||||
x64-windows/include/nlohmann/detail/meta/void_t.hpp
|
||||
x64-windows/include/nlohmann/detail/output/
|
||||
x64-windows/include/nlohmann/detail/output/binary_writer.hpp
|
||||
x64-windows/include/nlohmann/detail/output/output_adapters.hpp
|
||||
x64-windows/include/nlohmann/detail/output/serializer.hpp
|
||||
x64-windows/include/nlohmann/detail/string_concat.hpp
|
||||
x64-windows/include/nlohmann/detail/string_escape.hpp
|
||||
x64-windows/include/nlohmann/detail/string_utils.hpp
|
||||
x64-windows/include/nlohmann/detail/value_t.hpp
|
||||
x64-windows/include/nlohmann/json.hpp
|
||||
x64-windows/include/nlohmann/json_fwd.hpp
|
||||
x64-windows/include/nlohmann/ordered_map.hpp
|
||||
x64-windows/include/nlohmann/thirdparty/
|
||||
x64-windows/include/nlohmann/thirdparty/hedley/
|
||||
x64-windows/include/nlohmann/thirdparty/hedley/hedley.hpp
|
||||
x64-windows/include/nlohmann/thirdparty/hedley/hedley_undef.hpp
|
||||
x64-windows/share/
|
||||
x64-windows/share/nlohmann-json/
|
||||
x64-windows/share/nlohmann-json/copyright
|
||||
x64-windows/share/nlohmann-json/usage
|
||||
x64-windows/share/nlohmann-json/vcpkg.spdx.json
|
||||
x64-windows/share/nlohmann-json/vcpkg_abi_info.txt
|
||||
x64-windows/share/nlohmann_json/
|
||||
x64-windows/share/nlohmann_json/nlohmann_json.natvis
|
||||
x64-windows/share/nlohmann_json/nlohmann_jsonConfig.cmake
|
||||
x64-windows/share/nlohmann_json/nlohmann_jsonConfigVersion.cmake
|
||||
x64-windows/share/nlohmann_json/nlohmann_jsonTargets.cmake
|
||||
x64-windows/share/pkgconfig/
|
||||
x64-windows/share/pkgconfig/nlohmann_json.pc
|
||||
@ -0,0 +1,8 @@
|
||||
x64-windows/
|
||||
x64-windows/share/
|
||||
x64-windows/share/vcpkg-cmake-config/
|
||||
x64-windows/share/vcpkg-cmake-config/copyright
|
||||
x64-windows/share/vcpkg-cmake-config/vcpkg-port-config.cmake
|
||||
x64-windows/share/vcpkg-cmake-config/vcpkg.spdx.json
|
||||
x64-windows/share/vcpkg-cmake-config/vcpkg_abi_info.txt
|
||||
x64-windows/share/vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake
|
||||
@ -0,0 +1,10 @@
|
||||
x64-windows/
|
||||
x64-windows/share/
|
||||
x64-windows/share/vcpkg-cmake/
|
||||
x64-windows/share/vcpkg-cmake/copyright
|
||||
x64-windows/share/vcpkg-cmake/vcpkg-port-config.cmake
|
||||
x64-windows/share/vcpkg-cmake/vcpkg.spdx.json
|
||||
x64-windows/share/vcpkg-cmake/vcpkg_abi_info.txt
|
||||
x64-windows/share/vcpkg-cmake/vcpkg_cmake_build.cmake
|
||||
x64-windows/share/vcpkg-cmake/vcpkg_cmake_configure.cmake
|
||||
x64-windows/share/vcpkg-cmake/vcpkg_cmake_install.cmake
|
||||
3
build-clang/vcpkg_installed/vcpkg/manifest-info.json
Normal file
3
build-clang/vcpkg_installed/vcpkg/manifest-info.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"manifest-path": "C:\\Users\\mbusc\\source\\repos\\privatebin-cpp\\vcpkg.json"
|
||||
}
|
||||
34
build-clang/vcpkg_installed/vcpkg/status
Normal file
34
build-clang/vcpkg_installed/vcpkg/status
Normal file
@ -0,0 +1,34 @@
|
||||
Package: vcpkg-cmake-config
|
||||
Version: 2024-05-23
|
||||
Architecture: x64-windows
|
||||
Multi-Arch: same
|
||||
Abi: d1217d32eea9609394588fc64ac9fd154f22d2c82026ca4dd971739444e97371
|
||||
Status: install ok installed
|
||||
|
||||
Package: vcpkg-cmake
|
||||
Version: 2024-04-23
|
||||
Architecture: x64-windows
|
||||
Multi-Arch: same
|
||||
Abi: 1a1e06d1a279a7527a1bc12adb4cc058c8d26868fccc8fc11d1d9a56af2c2a26
|
||||
Status: install ok installed
|
||||
|
||||
Package: cryptopp
|
||||
Version: 8.9.0
|
||||
Port-Version: 1
|
||||
Depends: vcpkg-cmake, vcpkg-cmake-config
|
||||
Architecture: x64-windows
|
||||
Multi-Arch: same
|
||||
Abi: e02ab0d1b7c30c7a993a59f205f064d1a3565eb36c88160f2e1d995660045dee
|
||||
Description: Crypto++ is a free C++ class library of cryptographic schemes.
|
||||
Status: install ok installed
|
||||
|
||||
Package: nlohmann-json
|
||||
Version: 3.12.0
|
||||
Port-Version: 1
|
||||
Depends: vcpkg-cmake, vcpkg-cmake-config
|
||||
Architecture: x64-windows
|
||||
Multi-Arch: same
|
||||
Abi: 2ccd1f345f82f52e14bcfdeba59a51e43f6eeb952f1baec494e2b1c980d82aff
|
||||
Description: JSON for Modern C++
|
||||
Status: install ok installed
|
||||
|
||||
@ -0,0 +1,15 @@
|
||||
prefix=${pcfiledir}/../..
|
||||
# Crypto++ package configuration file
|
||||
|
||||
libdir=${prefix}/lib
|
||||
includedir=${prefix}/../include
|
||||
datadir=${prefix}/../share/cryptopp
|
||||
|
||||
Name: Crypto++
|
||||
URL: https://cryptopp.com/
|
||||
Description: Crypto++ cryptographic library (built with CMake)
|
||||
Version: 8.9.0
|
||||
|
||||
|
||||
Libs: "-L${libdir}" -lcryptopp
|
||||
Cflags: "-I${includedir}"
|
||||
@ -0,0 +1,63 @@
|
||||
// 3way.h - originally written and placed in the public domain by Wei Dai
|
||||
|
||||
/// \file 3way.h
|
||||
/// \brief Classes for the 3-Way block cipher
|
||||
|
||||
#ifndef CRYPTOPP_THREEWAY_H
|
||||
#define CRYPTOPP_THREEWAY_H
|
||||
|
||||
#include "config.h"
|
||||
#include "seckey.h"
|
||||
#include "secblock.h"
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
/// \brief ThreeWay block cipher information
|
||||
struct ThreeWay_Info : public FixedBlockSize<12>, public FixedKeyLength<12>, public VariableRounds<11>
|
||||
{
|
||||
CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "3-Way";}
|
||||
};
|
||||
|
||||
/// \brief ThreeWay block cipher
|
||||
/// \sa <a href="http://www.cryptopp.com/wiki/3-Way">3-Way</a>
|
||||
class ThreeWay : public ThreeWay_Info, public BlockCipherDocumentation
|
||||
{
|
||||
/// \brief Class specific implementation and overrides used to operate the cipher.
|
||||
/// \details Implementations and overrides in \p Base apply to both \p ENCRYPTION and \p DECRYPTION directions
|
||||
class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<ThreeWay_Info>
|
||||
{
|
||||
public:
|
||||
void UncheckedSetKey(const byte *key, unsigned int length, const NameValuePairs ¶ms);
|
||||
|
||||
protected:
|
||||
unsigned int m_rounds;
|
||||
FixedSizeSecBlock<word32, 3> m_k;
|
||||
};
|
||||
|
||||
/// \brief Class specific methods used to operate the cipher in the forward direction.
|
||||
/// \details Implementations and overrides in \p Enc apply to \p ENCRYPTION.
|
||||
class CRYPTOPP_NO_VTABLE Enc : public Base
|
||||
{
|
||||
public:
|
||||
void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
|
||||
};
|
||||
|
||||
/// \brief Class specific methods used to operate the cipher in the reverse direction.
|
||||
/// \details Implementations and overrides in \p Dec apply to \p DECRYPTION.
|
||||
class CRYPTOPP_NO_VTABLE Dec : public Base
|
||||
{
|
||||
public:
|
||||
void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
|
||||
};
|
||||
|
||||
public:
|
||||
typedef BlockCipherFinal<ENCRYPTION, Enc> Encryption;
|
||||
typedef BlockCipherFinal<DECRYPTION, Dec> Decryption;
|
||||
};
|
||||
|
||||
typedef ThreeWay::Encryption ThreeWayEncryption;
|
||||
typedef ThreeWay::Decryption ThreeWayDecryption;
|
||||
|
||||
NAMESPACE_END
|
||||
|
||||
#endif
|
||||
@ -0,0 +1,33 @@
|
||||
// adler32.h - originally written and placed in the public domain by Wei Dai
|
||||
|
||||
/// \file adler32.h
|
||||
/// \brief Class file for ADLER-32 checksum calculations
|
||||
|
||||
#ifndef CRYPTOPP_ADLER32_H
|
||||
#define CRYPTOPP_ADLER32_H
|
||||
|
||||
#include "cryptlib.h"
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
/// ADLER-32 checksum calculations
|
||||
class Adler32 : public HashTransformation
|
||||
{
|
||||
public:
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE = 4);
|
||||
Adler32() {Reset();}
|
||||
void Update(const byte *input, size_t length);
|
||||
void TruncatedFinal(byte *hash, size_t size);
|
||||
unsigned int DigestSize() const {return DIGESTSIZE;}
|
||||
CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "Adler32";}
|
||||
std::string AlgorithmName() const {return StaticAlgorithmName();}
|
||||
|
||||
private:
|
||||
void Reset() {m_s1 = 1; m_s2 = 0;}
|
||||
|
||||
word16 m_s1, m_s2;
|
||||
};
|
||||
|
||||
NAMESPACE_END
|
||||
|
||||
#endif
|
||||
1281
build-clang/vcpkg_installed/x64-windows/include/cryptopp/adv_simd.h
Normal file
1281
build-clang/vcpkg_installed/x64-windows/include/cryptopp/adv_simd.h
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,30 @@
|
||||
// aes.h - originally written and placed in the public domain by Wei Dai
|
||||
|
||||
/// \file
|
||||
/// \brief Class file for the AES cipher (Rijndael)
|
||||
/// \details AES is a typdef for Rijndael classes. All key sizes are supported.
|
||||
/// The library only provides Rijndael with 128-bit blocks, and not 192-bit or 256-bit blocks
|
||||
/// \since Rijndael since Crypto++ 3.1, Intel AES-NI since Crypto++ 5.6.1, ARMv8 AES since Crypto++ 6.0,
|
||||
/// Power8 AES since Crypto++ 6.0
|
||||
|
||||
#ifndef CRYPTOPP_AES_H
|
||||
#define CRYPTOPP_AES_H
|
||||
|
||||
#include "rijndael.h"
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
/// \brief AES block cipher (Rijndael)
|
||||
/// \details AES is a typdef for Rijndael classes. All key sizes are supported.
|
||||
/// The library only provides Rijndael with 128-bit blocks, and not 192-bit or 256-bit blocks
|
||||
/// \sa <a href="http://www.cryptolounge.org/wiki/AES">AES</a> winner, announced on 10/2/2000
|
||||
/// \since Rijndael since Crypto++ 3.1, Intel AES-NI since Crypto++ 5.6.1, ARMv8 AES since Crypto++ 6.0,
|
||||
/// Power8 AES since Crypto++ 6.0
|
||||
DOCUMENTED_TYPEDEF(Rijndael, AES);
|
||||
|
||||
typedef RijndaelEncryption AESEncryption;
|
||||
typedef RijndaelDecryption AESDecryption;
|
||||
|
||||
NAMESPACE_END
|
||||
|
||||
#endif
|
||||
@ -0,0 +1,30 @@
|
||||
/* Header file for use with Cryptogam's ARMv4 AES. */
|
||||
/* Also see http://www.openssl.org/~appro/cryptogams/ and */
|
||||
/* https://wiki.openssl.org/index.php?title=Cryptogams_AES */
|
||||
|
||||
#ifndef CRYPTOGAMS_AES_ARMV4_H
|
||||
#define CRYPTOGAMS_AES_ARMV4_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
//#define AES_MAXNR 14
|
||||
//typedef struct AES_KEY_st {
|
||||
// unsigned int rd_key[4 * (AES_MAXNR + 1)];
|
||||
// int rounds;
|
||||
//} AES_KEY;
|
||||
|
||||
// Instead of AES_KEY we use a 'word32 rkey[4*15+4]'. It has space for
|
||||
// both the AES_MAXNR round keys and the number of rounds in the tail.
|
||||
|
||||
int cryptogams_AES_set_encrypt_key(const unsigned char *userKey, const int bits, unsigned int *rkey);
|
||||
int cryptogams_AES_set_decrypt_key(const unsigned char *userKey, const int bits, unsigned int *rkey);
|
||||
void cryptogams_AES_encrypt_block(const unsigned char *in, unsigned char *out, const unsigned int *rkey);
|
||||
void cryptogams_AES_decrypt_block(const unsigned char *in, unsigned char *out, const unsigned int *rkey);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* CRYPTOGAMS_AES_ARMV4_H */
|
||||
@ -0,0 +1,453 @@
|
||||
// algebra.h - originally written and placed in the public domain by Wei Dai
|
||||
|
||||
/// \file algebra.h
|
||||
/// \brief Classes for performing mathematics over different fields
|
||||
|
||||
#ifndef CRYPTOPP_ALGEBRA_H
|
||||
#define CRYPTOPP_ALGEBRA_H
|
||||
|
||||
#include "config.h"
|
||||
#include "integer.h"
|
||||
#include "misc.h"
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
class Integer;
|
||||
|
||||
/// \brief Abstract group
|
||||
/// \tparam T element class or type
|
||||
/// \details <tt>const Element&</tt> returned by member functions are references
|
||||
/// to internal data members. Since each object may have only
|
||||
/// one such data member for holding results, the following code
|
||||
/// will produce incorrect results:
|
||||
/// <pre> abcd = group.Add(group.Add(a,b), group.Add(c,d));</pre>
|
||||
/// But this should be fine:
|
||||
/// <pre> abcd = group.Add(a, group.Add(b, group.Add(c,d));</pre>
|
||||
template <class T> class CRYPTOPP_NO_VTABLE AbstractGroup
|
||||
{
|
||||
public:
|
||||
typedef T Element;
|
||||
|
||||
virtual ~AbstractGroup() {}
|
||||
|
||||
/// \brief Compare two elements for equality
|
||||
/// \param a first element
|
||||
/// \param b second element
|
||||
/// \return true if the elements are equal, false otherwise
|
||||
/// \details Equal() tests the elements for equality using <tt>a==b</tt>
|
||||
virtual bool Equal(const Element &a, const Element &b) const =0;
|
||||
|
||||
/// \brief Provides the Identity element
|
||||
/// \return the Identity element
|
||||
virtual const Element& Identity() const =0;
|
||||
|
||||
/// \brief Adds elements in the group
|
||||
/// \param a first element
|
||||
/// \param b second element
|
||||
/// \return the sum of <tt>a</tt> and <tt>b</tt>
|
||||
virtual const Element& Add(const Element &a, const Element &b) const =0;
|
||||
|
||||
/// \brief Inverts the element in the group
|
||||
/// \param a first element
|
||||
/// \return the inverse of the element
|
||||
virtual const Element& Inverse(const Element &a) const =0;
|
||||
|
||||
/// \brief Determine if inversion is fast
|
||||
/// \return true if inversion is fast, false otherwise
|
||||
virtual bool InversionIsFast() const {return false;}
|
||||
|
||||
/// \brief Doubles an element in the group
|
||||
/// \param a the element
|
||||
/// \return the element doubled
|
||||
virtual const Element& Double(const Element &a) const;
|
||||
|
||||
/// \brief Subtracts elements in the group
|
||||
/// \param a first element
|
||||
/// \param b second element
|
||||
/// \return the difference of <tt>a</tt> and <tt>b</tt>. The element <tt>a</tt> must provide a Subtract member function.
|
||||
virtual const Element& Subtract(const Element &a, const Element &b) const;
|
||||
|
||||
/// \brief TODO
|
||||
/// \param a first element
|
||||
/// \param b second element
|
||||
/// \return TODO
|
||||
virtual Element& Accumulate(Element &a, const Element &b) const;
|
||||
|
||||
/// \brief Reduces an element in the congruence class
|
||||
/// \param a element to reduce
|
||||
/// \param b the congruence class
|
||||
/// \return the reduced element
|
||||
virtual Element& Reduce(Element &a, const Element &b) const;
|
||||
|
||||
/// \brief Performs a scalar multiplication
|
||||
/// \param a multiplicand
|
||||
/// \param e multiplier
|
||||
/// \return the product
|
||||
virtual Element ScalarMultiply(const Element &a, const Integer &e) const;
|
||||
|
||||
/// \brief TODO
|
||||
/// \param x first multiplicand
|
||||
/// \param e1 the first multiplier
|
||||
/// \param y second multiplicand
|
||||
/// \param e2 the second multiplier
|
||||
/// \return TODO
|
||||
virtual Element CascadeScalarMultiply(const Element &x, const Integer &e1, const Element &y, const Integer &e2) const;
|
||||
|
||||
/// \brief Multiplies a base to multiple exponents in a group
|
||||
/// \param results an array of Elements
|
||||
/// \param base the base to raise to the exponents
|
||||
/// \param exponents an array of exponents
|
||||
/// \param exponentsCount the number of exponents in the array
|
||||
/// \details SimultaneousMultiply() multiplies the base to each exponent in the exponents array and stores the
|
||||
/// result at the respective position in the results array.
|
||||
/// \details SimultaneousMultiply() must be implemented in a derived class.
|
||||
/// \pre <tt>COUNTOF(results) == exponentsCount</tt>
|
||||
/// \pre <tt>COUNTOF(exponents) == exponentsCount</tt>
|
||||
virtual void SimultaneousMultiply(Element *results, const Element &base, const Integer *exponents, unsigned int exponentsCount) const;
|
||||
};
|
||||
|
||||
/// \brief Abstract ring
|
||||
/// \tparam T element class or type
|
||||
/// \details <tt>const Element&</tt> returned by member functions are references
|
||||
/// to internal data members. Since each object may have only
|
||||
/// one such data member for holding results, the following code
|
||||
/// will produce incorrect results:
|
||||
/// <pre> abcd = group.Add(group.Add(a,b), group.Add(c,d));</pre>
|
||||
/// But this should be fine:
|
||||
/// <pre> abcd = group.Add(a, group.Add(b, group.Add(c,d));</pre>
|
||||
template <class T> class CRYPTOPP_NO_VTABLE AbstractRing : public AbstractGroup<T>
|
||||
{
|
||||
public:
|
||||
typedef T Element;
|
||||
|
||||
/// \brief Construct an AbstractRing
|
||||
AbstractRing() {m_mg.m_pRing = this;}
|
||||
|
||||
/// \brief Copy construct an AbstractRing
|
||||
/// \param source other AbstractRing
|
||||
AbstractRing(const AbstractRing &source)
|
||||
{CRYPTOPP_UNUSED(source); m_mg.m_pRing = this;}
|
||||
|
||||
/// \brief Assign an AbstractRing
|
||||
/// \param source other AbstractRing
|
||||
AbstractRing& operator=(const AbstractRing &source)
|
||||
{CRYPTOPP_UNUSED(source); return *this;}
|
||||
|
||||
/// \brief Determines whether an element is a unit in the group
|
||||
/// \param a the element
|
||||
/// \return true if the element is a unit after reduction, false otherwise.
|
||||
virtual bool IsUnit(const Element &a) const =0;
|
||||
|
||||
/// \brief Retrieves the multiplicative identity
|
||||
/// \return the multiplicative identity
|
||||
virtual const Element& MultiplicativeIdentity() const =0;
|
||||
|
||||
/// \brief Multiplies elements in the group
|
||||
/// \param a the multiplicand
|
||||
/// \param b the multiplier
|
||||
/// \return the product of a and b
|
||||
virtual const Element& Multiply(const Element &a, const Element &b) const =0;
|
||||
|
||||
/// \brief Calculate the multiplicative inverse of an element in the group
|
||||
/// \param a the element
|
||||
virtual const Element& MultiplicativeInverse(const Element &a) const =0;
|
||||
|
||||
/// \brief Square an element in the group
|
||||
/// \param a the element
|
||||
/// \return the element squared
|
||||
virtual const Element& Square(const Element &a) const;
|
||||
|
||||
/// \brief Divides elements in the group
|
||||
/// \param a the dividend
|
||||
/// \param b the divisor
|
||||
/// \return the quotient
|
||||
virtual const Element& Divide(const Element &a, const Element &b) const;
|
||||
|
||||
/// \brief Raises a base to an exponent in the group
|
||||
/// \param a the base
|
||||
/// \param e the exponent
|
||||
/// \return the exponentiation
|
||||
virtual Element Exponentiate(const Element &a, const Integer &e) const;
|
||||
|
||||
/// \brief TODO
|
||||
/// \param x first element
|
||||
/// \param e1 first exponent
|
||||
/// \param y second element
|
||||
/// \param e2 second exponent
|
||||
/// \return TODO
|
||||
virtual Element CascadeExponentiate(const Element &x, const Integer &e1, const Element &y, const Integer &e2) const;
|
||||
|
||||
/// \brief Exponentiates a base to multiple exponents in the Ring
|
||||
/// \param results an array of Elements
|
||||
/// \param base the base to raise to the exponents
|
||||
/// \param exponents an array of exponents
|
||||
/// \param exponentsCount the number of exponents in the array
|
||||
/// \details SimultaneousExponentiate() raises the base to each exponent in the exponents array and stores the
|
||||
/// result at the respective position in the results array.
|
||||
/// \details SimultaneousExponentiate() must be implemented in a derived class.
|
||||
/// \pre <tt>COUNTOF(results) == exponentsCount</tt>
|
||||
/// \pre <tt>COUNTOF(exponents) == exponentsCount</tt>
|
||||
virtual void SimultaneousExponentiate(Element *results, const Element &base, const Integer *exponents, unsigned int exponentsCount) const;
|
||||
|
||||
/// \brief Retrieves the multiplicative group
|
||||
/// \return the multiplicative group
|
||||
virtual const AbstractGroup<T>& MultiplicativeGroup() const
|
||||
{return m_mg;}
|
||||
|
||||
private:
|
||||
class MultiplicativeGroupT : public AbstractGroup<T>
|
||||
{
|
||||
public:
|
||||
const AbstractRing<T>& GetRing() const
|
||||
{return *m_pRing;}
|
||||
|
||||
bool Equal(const Element &a, const Element &b) const
|
||||
{return GetRing().Equal(a, b);}
|
||||
|
||||
const Element& Identity() const
|
||||
{return GetRing().MultiplicativeIdentity();}
|
||||
|
||||
const Element& Add(const Element &a, const Element &b) const
|
||||
{return GetRing().Multiply(a, b);}
|
||||
|
||||
Element& Accumulate(Element &a, const Element &b) const
|
||||
{return a = GetRing().Multiply(a, b);}
|
||||
|
||||
const Element& Inverse(const Element &a) const
|
||||
{return GetRing().MultiplicativeInverse(a);}
|
||||
|
||||
const Element& Subtract(const Element &a, const Element &b) const
|
||||
{return GetRing().Divide(a, b);}
|
||||
|
||||
Element& Reduce(Element &a, const Element &b) const
|
||||
{return a = GetRing().Divide(a, b);}
|
||||
|
||||
const Element& Double(const Element &a) const
|
||||
{return GetRing().Square(a);}
|
||||
|
||||
Element ScalarMultiply(const Element &a, const Integer &e) const
|
||||
{return GetRing().Exponentiate(a, e);}
|
||||
|
||||
Element CascadeScalarMultiply(const Element &x, const Integer &e1, const Element &y, const Integer &e2) const
|
||||
{return GetRing().CascadeExponentiate(x, e1, y, e2);}
|
||||
|
||||
void SimultaneousMultiply(Element *results, const Element &base, const Integer *exponents, unsigned int exponentsCount) const
|
||||
{GetRing().SimultaneousExponentiate(results, base, exponents, exponentsCount);}
|
||||
|
||||
const AbstractRing<T> *m_pRing;
|
||||
};
|
||||
|
||||
MultiplicativeGroupT m_mg;
|
||||
};
|
||||
|
||||
// ********************************************************
|
||||
|
||||
/// \brief Base and exponent
|
||||
/// \tparam T base class or type
|
||||
/// \tparam E exponent class or type
|
||||
template <class T, class E = Integer>
|
||||
struct BaseAndExponent
|
||||
{
|
||||
public:
|
||||
BaseAndExponent() {}
|
||||
BaseAndExponent(const T &base, const E &exponent) : base(base), exponent(exponent) {}
|
||||
bool operator<(const BaseAndExponent<T, E> &rhs) const {return exponent < rhs.exponent;}
|
||||
T base;
|
||||
E exponent;
|
||||
};
|
||||
|
||||
// VC60 workaround: incomplete member template support
|
||||
template <class Element, class Iterator>
|
||||
Element GeneralCascadeMultiplication(const AbstractGroup<Element> &group, Iterator begin, Iterator end);
|
||||
template <class Element, class Iterator>
|
||||
Element GeneralCascadeExponentiation(const AbstractRing<Element> &ring, Iterator begin, Iterator end);
|
||||
|
||||
// ********************************************************
|
||||
|
||||
/// \brief Abstract Euclidean domain
|
||||
/// \tparam T element class or type
|
||||
/// \details <tt>const Element&</tt> returned by member functions are references
|
||||
/// to internal data members. Since each object may have only
|
||||
/// one such data member for holding results, the following code
|
||||
/// will produce incorrect results:
|
||||
/// <pre> abcd = group.Add(group.Add(a,b), group.Add(c,d));</pre>
|
||||
/// But this should be fine:
|
||||
/// <pre> abcd = group.Add(a, group.Add(b, group.Add(c,d));</pre>
|
||||
template <class T> class CRYPTOPP_NO_VTABLE AbstractEuclideanDomain : public AbstractRing<T>
|
||||
{
|
||||
public:
|
||||
typedef T Element;
|
||||
|
||||
/// \brief Performs the division algorithm on two elements in the ring
|
||||
/// \param r the remainder
|
||||
/// \param q the quotient
|
||||
/// \param a the dividend
|
||||
/// \param d the divisor
|
||||
virtual void DivisionAlgorithm(Element &r, Element &q, const Element &a, const Element &d) const =0;
|
||||
|
||||
/// \brief Performs a modular reduction in the ring
|
||||
/// \param a the element
|
||||
/// \param b the modulus
|
||||
/// \return the result of <tt>a%b</tt>.
|
||||
virtual const Element& Mod(const Element &a, const Element &b) const =0;
|
||||
|
||||
/// \brief Calculates the greatest common denominator in the ring
|
||||
/// \param a the first element
|
||||
/// \param b the second element
|
||||
/// \return the greatest common denominator of a and b.
|
||||
virtual const Element& Gcd(const Element &a, const Element &b) const;
|
||||
|
||||
protected:
|
||||
mutable Element result;
|
||||
};
|
||||
|
||||
// ********************************************************
|
||||
|
||||
/// \brief Euclidean domain
|
||||
/// \tparam T element class or type
|
||||
/// \details <tt>const Element&</tt> returned by member functions are references
|
||||
/// to internal data members. Since each object may have only
|
||||
/// one such data member for holding results, the following code
|
||||
/// will produce incorrect results:
|
||||
/// <pre> abcd = group.Add(group.Add(a,b), group.Add(c,d));</pre>
|
||||
/// But this should be fine:
|
||||
/// <pre> abcd = group.Add(a, group.Add(b, group.Add(c,d));</pre>
|
||||
template <class T> class EuclideanDomainOf : public AbstractEuclideanDomain<T>
|
||||
{
|
||||
public:
|
||||
typedef T Element;
|
||||
|
||||
EuclideanDomainOf() {}
|
||||
|
||||
bool Equal(const Element &a, const Element &b) const
|
||||
{return a==b;}
|
||||
|
||||
const Element& Identity() const
|
||||
{return Element::Zero();}
|
||||
|
||||
const Element& Add(const Element &a, const Element &b) const
|
||||
{return result = a+b;}
|
||||
|
||||
Element& Accumulate(Element &a, const Element &b) const
|
||||
{return a+=b;}
|
||||
|
||||
const Element& Inverse(const Element &a) const
|
||||
{return result = -a;}
|
||||
|
||||
const Element& Subtract(const Element &a, const Element &b) const
|
||||
{return result = a-b;}
|
||||
|
||||
Element& Reduce(Element &a, const Element &b) const
|
||||
{return a-=b;}
|
||||
|
||||
const Element& Double(const Element &a) const
|
||||
{return result = a.Doubled();}
|
||||
|
||||
const Element& MultiplicativeIdentity() const
|
||||
{return Element::One();}
|
||||
|
||||
const Element& Multiply(const Element &a, const Element &b) const
|
||||
{return result = a*b;}
|
||||
|
||||
const Element& Square(const Element &a) const
|
||||
{return result = a.Squared();}
|
||||
|
||||
bool IsUnit(const Element &a) const
|
||||
{return a.IsUnit();}
|
||||
|
||||
const Element& MultiplicativeInverse(const Element &a) const
|
||||
{return result = a.MultiplicativeInverse();}
|
||||
|
||||
const Element& Divide(const Element &a, const Element &b) const
|
||||
{return result = a/b;}
|
||||
|
||||
const Element& Mod(const Element &a, const Element &b) const
|
||||
{return result = a%b;}
|
||||
|
||||
void DivisionAlgorithm(Element &r, Element &q, const Element &a, const Element &d) const
|
||||
{Element::Divide(r, q, a, d);}
|
||||
|
||||
bool operator==(const EuclideanDomainOf<T> &rhs) const
|
||||
{CRYPTOPP_UNUSED(rhs); return true;}
|
||||
|
||||
private:
|
||||
mutable Element result;
|
||||
};
|
||||
|
||||
/// \brief Quotient ring
|
||||
/// \tparam T element class or type
|
||||
/// \details <tt>const Element&</tt> returned by member functions are references
|
||||
/// to internal data members. Since each object may have only
|
||||
/// one such data member for holding results, the following code
|
||||
/// will produce incorrect results:
|
||||
/// <pre> abcd = group.Add(group.Add(a,b), group.Add(c,d));</pre>
|
||||
/// But this should be fine:
|
||||
/// <pre> abcd = group.Add(a, group.Add(b, group.Add(c,d));</pre>
|
||||
template <class T> class QuotientRing : public AbstractRing<typename T::Element>
|
||||
{
|
||||
public:
|
||||
typedef T EuclideanDomain;
|
||||
typedef typename T::Element Element;
|
||||
|
||||
QuotientRing(const EuclideanDomain &domain, const Element &modulus)
|
||||
: m_domain(domain), m_modulus(modulus) {}
|
||||
|
||||
const EuclideanDomain & GetDomain() const
|
||||
{return m_domain;}
|
||||
|
||||
const Element& GetModulus() const
|
||||
{return m_modulus;}
|
||||
|
||||
bool Equal(const Element &a, const Element &b) const
|
||||
{return m_domain.Equal(m_domain.Mod(m_domain.Subtract(a, b), m_modulus), m_domain.Identity());}
|
||||
|
||||
const Element& Identity() const
|
||||
{return m_domain.Identity();}
|
||||
|
||||
const Element& Add(const Element &a, const Element &b) const
|
||||
{return m_domain.Add(a, b);}
|
||||
|
||||
Element& Accumulate(Element &a, const Element &b) const
|
||||
{return m_domain.Accumulate(a, b);}
|
||||
|
||||
const Element& Inverse(const Element &a) const
|
||||
{return m_domain.Inverse(a);}
|
||||
|
||||
const Element& Subtract(const Element &a, const Element &b) const
|
||||
{return m_domain.Subtract(a, b);}
|
||||
|
||||
Element& Reduce(Element &a, const Element &b) const
|
||||
{return m_domain.Reduce(a, b);}
|
||||
|
||||
const Element& Double(const Element &a) const
|
||||
{return m_domain.Double(a);}
|
||||
|
||||
bool IsUnit(const Element &a) const
|
||||
{return m_domain.IsUnit(m_domain.Gcd(a, m_modulus));}
|
||||
|
||||
const Element& MultiplicativeIdentity() const
|
||||
{return m_domain.MultiplicativeIdentity();}
|
||||
|
||||
const Element& Multiply(const Element &a, const Element &b) const
|
||||
{return m_domain.Mod(m_domain.Multiply(a, b), m_modulus);}
|
||||
|
||||
const Element& Square(const Element &a) const
|
||||
{return m_domain.Mod(m_domain.Square(a), m_modulus);}
|
||||
|
||||
const Element& MultiplicativeInverse(const Element &a) const;
|
||||
|
||||
bool operator==(const QuotientRing<T> &rhs) const
|
||||
{return m_domain == rhs.m_domain && m_modulus == rhs.m_modulus;}
|
||||
|
||||
protected:
|
||||
EuclideanDomain m_domain;
|
||||
Element m_modulus;
|
||||
};
|
||||
|
||||
NAMESPACE_END
|
||||
|
||||
#ifdef CRYPTOPP_MANUALLY_INSTANTIATE_TEMPLATES
|
||||
#include "algebra.cpp"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@ -0,0 +1,520 @@
|
||||
// algparam.h - originally written and placed in the public domain by Wei Dai
|
||||
|
||||
/// \file algparam.h
|
||||
/// \brief Classes for working with NameValuePairs
|
||||
|
||||
#ifndef CRYPTOPP_ALGPARAM_H
|
||||
#define CRYPTOPP_ALGPARAM_H
|
||||
|
||||
#include "config.h"
|
||||
#include "cryptlib.h"
|
||||
|
||||
#include "smartptr.h"
|
||||
#include "secblock.h"
|
||||
#include "integer.h"
|
||||
#include "misc.h"
|
||||
|
||||
#include <string>
|
||||
#include <typeinfo>
|
||||
#include <exception>
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
/// \brief Used to pass byte array input as part of a NameValuePairs object
|
||||
class ConstByteArrayParameter
|
||||
{
|
||||
public:
|
||||
/// \brief Construct a ConstByteArrayParameter
|
||||
/// \param data a C-String
|
||||
/// \param deepCopy flag indicating whether the data should be copied
|
||||
/// \details The deepCopy option is used when the NameValuePairs object can't
|
||||
/// keep a copy of the data available
|
||||
ConstByteArrayParameter(const char *data = NULLPTR, bool deepCopy = false)
|
||||
: m_deepCopy(false), m_data(NULLPTR), m_size(0)
|
||||
{
|
||||
Assign(reinterpret_cast<const byte *>(data), data ? strlen(data) : 0, deepCopy);
|
||||
}
|
||||
|
||||
/// \brief Construct a ConstByteArrayParameter
|
||||
/// \param data a memory buffer
|
||||
/// \param size the length of the memory buffer
|
||||
/// \param deepCopy flag indicating whether the data should be copied
|
||||
/// \details The deepCopy option is used when the NameValuePairs object can't
|
||||
/// keep a copy of the data available
|
||||
ConstByteArrayParameter(const byte *data, size_t size, bool deepCopy = false)
|
||||
: m_deepCopy(false), m_data(NULLPTR), m_size(0)
|
||||
{
|
||||
Assign(data, size, deepCopy);
|
||||
}
|
||||
|
||||
/// \brief Construct a ConstByteArrayParameter
|
||||
/// \tparam T a std::basic_string<char> or std::vector<byte> class
|
||||
/// \param string a std::basic_string<char> or std::vector<byte> object
|
||||
/// \param deepCopy flag indicating whether the data should be copied
|
||||
/// \details The deepCopy option is used when the NameValuePairs object can't
|
||||
/// keep a copy of the data available
|
||||
template <class T> ConstByteArrayParameter(const T &string, bool deepCopy = false)
|
||||
: m_deepCopy(false), m_data(NULLPTR), m_size(0)
|
||||
{
|
||||
CRYPTOPP_COMPILE_ASSERT(sizeof(typename T::value_type) == 1);
|
||||
Assign(reinterpret_cast<const byte *>(&string[0]), string.size(), deepCopy);
|
||||
}
|
||||
|
||||
/// \brief Assign contents from a memory buffer
|
||||
/// \param data a memory buffer
|
||||
/// \param size the length of the memory buffer
|
||||
/// \param deepCopy flag indicating whether the data should be copied
|
||||
/// \details The deepCopy option is used when the NameValuePairs object can't
|
||||
/// keep a copy of the data available
|
||||
void Assign(const byte *data, size_t size, bool deepCopy)
|
||||
{
|
||||
// This fires, which means: no data with a size, or data with no size.
|
||||
// CRYPTOPP_ASSERT((data && size) || !(data || size));
|
||||
if (deepCopy)
|
||||
m_block.Assign(data, size);
|
||||
else
|
||||
{
|
||||
m_data = data;
|
||||
m_size = size;
|
||||
}
|
||||
m_deepCopy = deepCopy;
|
||||
}
|
||||
|
||||
/// \brief Pointer to the first byte in the memory block
|
||||
const byte *begin() const {return m_deepCopy ? m_block.begin() : m_data;}
|
||||
/// \brief Pointer beyond the last byte in the memory block
|
||||
const byte *end() const {return m_deepCopy ? m_block.end() : m_data + m_size;}
|
||||
/// \brief Length of the memory block
|
||||
size_t size() const {return m_deepCopy ? m_block.size() : m_size;}
|
||||
|
||||
private:
|
||||
bool m_deepCopy;
|
||||
const byte *m_data;
|
||||
size_t m_size;
|
||||
SecByteBlock m_block;
|
||||
};
|
||||
|
||||
/// \brief Used to pass byte array input as part of a NameValuePairs object
|
||||
class ByteArrayParameter
|
||||
{
|
||||
public:
|
||||
/// \brief Construct a ByteArrayParameter
|
||||
/// \param data a memory buffer
|
||||
/// \param size the length of the memory buffer
|
||||
ByteArrayParameter(byte *data = NULLPTR, unsigned int size = 0)
|
||||
: m_data(data), m_size(size) {}
|
||||
|
||||
/// \brief Construct a ByteArrayParameter
|
||||
/// \param block a SecByteBlock
|
||||
ByteArrayParameter(SecByteBlock &block)
|
||||
: m_data(block.begin()), m_size(block.size()) {}
|
||||
|
||||
/// \brief Pointer to the first byte in the memory block
|
||||
byte *begin() const {return m_data;}
|
||||
/// \brief Pointer beyond the last byte in the memory block
|
||||
byte *end() const {return m_data + m_size;}
|
||||
/// \brief Length of the memory block
|
||||
size_t size() const {return m_size;}
|
||||
|
||||
private:
|
||||
byte *m_data;
|
||||
size_t m_size;
|
||||
};
|
||||
|
||||
/// \brief Combines two sets of NameValuePairs
|
||||
/// \details CombinedNameValuePairs allows you to provide two sets of of NameValuePairs.
|
||||
/// If a name is not found in the first set, then the second set is searched for the
|
||||
/// name and value pair. The second set of NameValuePairs often provides default values.
|
||||
class CRYPTOPP_DLL CombinedNameValuePairs : public NameValuePairs
|
||||
{
|
||||
public:
|
||||
/// \brief Construct a CombinedNameValuePairs
|
||||
/// \param pairs1 reference to the first set of NameValuePairs
|
||||
/// \param pairs2 reference to the second set of NameValuePairs
|
||||
CombinedNameValuePairs(const NameValuePairs &pairs1, const NameValuePairs &pairs2)
|
||||
: m_pairs1(pairs1), m_pairs2(pairs2) {}
|
||||
|
||||
bool GetVoidValue(const char *name, const std::type_info &valueType, void *pValue) const;
|
||||
|
||||
private:
|
||||
const NameValuePairs &m_pairs1, &m_pairs2;
|
||||
};
|
||||
|
||||
#ifndef CRYPTOPP_DOXYGEN_PROCESSING
|
||||
template <class T, class BASE>
|
||||
class GetValueHelperClass
|
||||
{
|
||||
public:
|
||||
GetValueHelperClass(const T *pObject, const char *name, const std::type_info &valueType, void *pValue, const NameValuePairs *searchFirst)
|
||||
: m_pObject(pObject), m_name(name), m_valueType(&valueType), m_pValue(pValue), m_found(false), m_getValueNames(false)
|
||||
{
|
||||
if (strcmp(m_name, "ValueNames") == 0)
|
||||
{
|
||||
m_found = m_getValueNames = true;
|
||||
NameValuePairs::ThrowIfTypeMismatch(m_name, typeid(std::string), *m_valueType);
|
||||
if (searchFirst)
|
||||
searchFirst->GetVoidValue(m_name, valueType, pValue);
|
||||
if (typeid(T) != typeid(BASE))
|
||||
pObject->BASE::GetVoidValue(m_name, valueType, pValue);
|
||||
((*reinterpret_cast<std::string *>(m_pValue) += "ThisPointer:") += typeid(T).name()) += ';';
|
||||
}
|
||||
|
||||
if (!m_found && strncmp(m_name, "ThisPointer:", 12) == 0 && strcmp(m_name+12, typeid(T).name()) == 0)
|
||||
{
|
||||
NameValuePairs::ThrowIfTypeMismatch(m_name, typeid(T *), *m_valueType);
|
||||
*reinterpret_cast<const T **>(pValue) = pObject;
|
||||
m_found = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!m_found && searchFirst)
|
||||
m_found = searchFirst->GetVoidValue(m_name, valueType, pValue);
|
||||
|
||||
if (!m_found && typeid(T) != typeid(BASE))
|
||||
m_found = pObject->BASE::GetVoidValue(m_name, valueType, pValue);
|
||||
}
|
||||
|
||||
operator bool() const {return m_found;}
|
||||
|
||||
template <class R>
|
||||
GetValueHelperClass<T,BASE> & operator()(const char *name, const R & (T::*pm)() const)
|
||||
{
|
||||
if (m_getValueNames)
|
||||
(*reinterpret_cast<std::string *>(m_pValue) += name) += ";";
|
||||
if (!m_found && strcmp(name, m_name) == 0)
|
||||
{
|
||||
NameValuePairs::ThrowIfTypeMismatch(name, typeid(R), *m_valueType);
|
||||
*reinterpret_cast<R *>(m_pValue) = (m_pObject->*pm)();
|
||||
m_found = true;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
GetValueHelperClass<T,BASE> &Assignable()
|
||||
{
|
||||
#ifndef __INTEL_COMPILER // ICL 9.1 workaround: Intel compiler copies the vTable pointer for some reason
|
||||
if (m_getValueNames)
|
||||
((*reinterpret_cast<std::string *>(m_pValue) += "ThisObject:") += typeid(T).name()) += ';';
|
||||
if (!m_found && strncmp(m_name, "ThisObject:", 11) == 0 && strcmp(m_name+11, typeid(T).name()) == 0)
|
||||
{
|
||||
NameValuePairs::ThrowIfTypeMismatch(m_name, typeid(T), *m_valueType);
|
||||
*reinterpret_cast<T *>(m_pValue) = *m_pObject;
|
||||
m_found = true;
|
||||
}
|
||||
#endif
|
||||
return *this;
|
||||
}
|
||||
|
||||
private:
|
||||
const T *m_pObject;
|
||||
const char *m_name;
|
||||
const std::type_info *m_valueType;
|
||||
void *m_pValue;
|
||||
bool m_found, m_getValueNames;
|
||||
};
|
||||
|
||||
template <class BASE, class T>
|
||||
GetValueHelperClass<T, BASE> GetValueHelper(const T *pObject, const char *name, const std::type_info &valueType, void *pValue, const NameValuePairs *searchFirst=NULLPTR)
|
||||
{
|
||||
return GetValueHelperClass<T, BASE>(pObject, name, valueType, pValue, searchFirst);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
GetValueHelperClass<T, T> GetValueHelper(const T *pObject, const char *name, const std::type_info &valueType, void *pValue, const NameValuePairs *searchFirst=NULLPTR)
|
||||
{
|
||||
return GetValueHelperClass<T, T>(pObject, name, valueType, pValue, searchFirst);
|
||||
}
|
||||
|
||||
// ********************************************************
|
||||
|
||||
template <class T, class BASE>
|
||||
class AssignFromHelperClass
|
||||
{
|
||||
public:
|
||||
AssignFromHelperClass(T *pObject, const NameValuePairs &source)
|
||||
: m_pObject(pObject), m_source(source), m_done(false)
|
||||
{
|
||||
if (source.GetThisObject(*pObject))
|
||||
m_done = true;
|
||||
else if (typeid(BASE) != typeid(T))
|
||||
pObject->BASE::AssignFrom(source);
|
||||
}
|
||||
|
||||
template <class R>
|
||||
AssignFromHelperClass & operator()(const char *name, void (T::*pm)(const R&))
|
||||
{
|
||||
if (!m_done)
|
||||
{
|
||||
R value;
|
||||
if (!m_source.GetValue(name, value))
|
||||
throw InvalidArgument(std::string(typeid(T).name()) + ": Missing required parameter '" + name + "'");
|
||||
(m_pObject->*pm)(value);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <class R, class S>
|
||||
AssignFromHelperClass & operator()(const char *name1, const char *name2, void (T::*pm)(const R&, const S&))
|
||||
{
|
||||
if (!m_done)
|
||||
{
|
||||
R value1;
|
||||
if (!m_source.GetValue(name1, value1))
|
||||
throw InvalidArgument(std::string(typeid(T).name()) + ": Missing required parameter '" + name1 + "'");
|
||||
S value2;
|
||||
if (!m_source.GetValue(name2, value2))
|
||||
throw InvalidArgument(std::string(typeid(T).name()) + ": Missing required parameter '" + name2 + "'");
|
||||
(m_pObject->*pm)(value1, value2);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
private:
|
||||
T *m_pObject;
|
||||
const NameValuePairs &m_source;
|
||||
bool m_done;
|
||||
};
|
||||
|
||||
template <class BASE, class T>
|
||||
AssignFromHelperClass<T, BASE> AssignFromHelper(T *pObject, const NameValuePairs &source)
|
||||
{
|
||||
return AssignFromHelperClass<T, BASE>(pObject, source);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
AssignFromHelperClass<T, T> AssignFromHelper(T *pObject, const NameValuePairs &source)
|
||||
{
|
||||
return AssignFromHelperClass<T, T>(pObject, source);
|
||||
}
|
||||
|
||||
#endif // CRYPTOPP_DOXYGEN_PROCESSING
|
||||
|
||||
// ********************************************************
|
||||
|
||||
#ifndef CRYPTOPP_NO_ASSIGN_TO_INTEGER
|
||||
// Allow the linker to discard Integer code if not needed.
|
||||
// Also see http://github.com/weidai11/cryptopp/issues/389.
|
||||
CRYPTOPP_DLL bool AssignIntToInteger(const std::type_info &valueType, void *pInteger, const void *pInt);
|
||||
#endif
|
||||
|
||||
CRYPTOPP_DLL const std::type_info & CRYPTOPP_API IntegerTypeId();
|
||||
|
||||
/// \brief Base class for AlgorithmParameters
|
||||
class CRYPTOPP_DLL AlgorithmParametersBase
|
||||
{
|
||||
public:
|
||||
/// \brief Exception thrown when an AlgorithmParameter is unused
|
||||
class ParameterNotUsed : public Exception
|
||||
{
|
||||
public:
|
||||
ParameterNotUsed(const char *name) : Exception(OTHER_ERROR, std::string("AlgorithmParametersBase: parameter \"") + name + "\" not used") {}
|
||||
};
|
||||
|
||||
virtual ~AlgorithmParametersBase() CRYPTOPP_THROW
|
||||
{
|
||||
|
||||
#if defined(CRYPTOPP_CXX17_UNCAUGHT_EXCEPTIONS)
|
||||
if (std::uncaught_exceptions() == 0)
|
||||
#elif defined(CRYPTOPP_CXX98_UNCAUGHT_EXCEPTION)
|
||||
if (std::uncaught_exception() == false)
|
||||
#else
|
||||
try
|
||||
#endif
|
||||
{
|
||||
if (m_throwIfNotUsed && !m_used)
|
||||
throw ParameterNotUsed(m_name);
|
||||
}
|
||||
#if !defined(CRYPTOPP_CXX98_UNCAUGHT_EXCEPTION)
|
||||
# if !defined(CRYPTOPP_CXX17_UNCAUGHT_EXCEPTIONS)
|
||||
catch(const Exception&)
|
||||
{
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
|
||||
// this is actually a move, not a copy
|
||||
AlgorithmParametersBase(const AlgorithmParametersBase &x)
|
||||
: m_name(x.m_name), m_throwIfNotUsed(x.m_throwIfNotUsed), m_used(x.m_used)
|
||||
{
|
||||
m_next.reset(const_cast<AlgorithmParametersBase &>(x).m_next.release());
|
||||
x.m_used = true;
|
||||
}
|
||||
|
||||
/// \brief Construct a AlgorithmParametersBase
|
||||
/// \param name the parameter name
|
||||
/// \param throwIfNotUsed flags indicating whether an exception should be thrown
|
||||
/// \details If throwIfNotUsed is true, then a ParameterNotUsed exception
|
||||
/// will be thrown in the destructor if the parameter is not not retrieved.
|
||||
AlgorithmParametersBase(const char *name, bool throwIfNotUsed)
|
||||
: m_name(name), m_throwIfNotUsed(throwIfNotUsed), m_used(false) {}
|
||||
|
||||
bool GetVoidValue(const char *name, const std::type_info &valueType, void *pValue) const;
|
||||
|
||||
protected:
|
||||
friend class AlgorithmParameters;
|
||||
void operator=(const AlgorithmParametersBase& rhs); // assignment not allowed, declare this for VC60
|
||||
|
||||
virtual void AssignValue(const char *name, const std::type_info &valueType, void *pValue) const =0;
|
||||
virtual void MoveInto(void *p) const =0; // not really const
|
||||
|
||||
const char *m_name;
|
||||
bool m_throwIfNotUsed;
|
||||
mutable bool m_used;
|
||||
member_ptr<AlgorithmParametersBase> m_next;
|
||||
};
|
||||
|
||||
/// \brief Template base class for AlgorithmParameters
|
||||
/// \tparam T the class or type
|
||||
template <class T>
|
||||
class AlgorithmParametersTemplate : public AlgorithmParametersBase
|
||||
{
|
||||
public:
|
||||
/// \brief Construct an AlgorithmParametersTemplate
|
||||
/// \param name the name of the value
|
||||
/// \param value a reference to the value
|
||||
/// \param throwIfNotUsed flags indicating whether an exception should be thrown
|
||||
/// \details If throwIfNotUsed is true, then a ParameterNotUsed exception
|
||||
/// will be thrown in the destructor if the parameter is not not retrieved.
|
||||
AlgorithmParametersTemplate(const char *name, const T &value, bool throwIfNotUsed)
|
||||
: AlgorithmParametersBase(name, throwIfNotUsed), m_value(value)
|
||||
{
|
||||
}
|
||||
|
||||
void AssignValue(const char *name, const std::type_info &valueType, void *pValue) const
|
||||
{
|
||||
#ifndef CRYPTOPP_NO_ASSIGN_TO_INTEGER
|
||||
// Special case for retrieving an Integer parameter when an int was passed in
|
||||
if (!(typeid(T) == typeid(int) && AssignIntToInteger(valueType, pValue, &m_value)))
|
||||
#endif
|
||||
{
|
||||
NameValuePairs::ThrowIfTypeMismatch(name, typeid(T), valueType);
|
||||
*reinterpret_cast<T *>(pValue) = m_value;
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(DEBUG_NEW) && (CRYPTOPP_MSC_VERSION >= 1300)
|
||||
# pragma push_macro("new")
|
||||
# undef new
|
||||
#endif
|
||||
|
||||
void MoveInto(void *buffer) const
|
||||
{
|
||||
AlgorithmParametersTemplate<T>* p = new(buffer) AlgorithmParametersTemplate<T>(*this);
|
||||
CRYPTOPP_UNUSED(p); // silence warning
|
||||
}
|
||||
|
||||
#if defined(DEBUG_NEW) && (CRYPTOPP_MSC_VERSION >= 1300)
|
||||
# pragma pop_macro("new")
|
||||
#endif
|
||||
|
||||
protected:
|
||||
T m_value;
|
||||
};
|
||||
|
||||
CRYPTOPP_DLL_TEMPLATE_CLASS AlgorithmParametersTemplate<bool>;
|
||||
CRYPTOPP_DLL_TEMPLATE_CLASS AlgorithmParametersTemplate<int>;
|
||||
CRYPTOPP_DLL_TEMPLATE_CLASS AlgorithmParametersTemplate<ConstByteArrayParameter>;
|
||||
|
||||
/// \brief An object that implements NameValuePairs
|
||||
/// \note A NameValuePairs object containing an arbitrary number of name value pairs may be constructed by
|
||||
/// repeatedly using operator() on the object returned by MakeParameters, for example:
|
||||
/// <pre>
|
||||
/// AlgorithmParameters parameters = MakeParameters(name1, value1)(name2, value2)(name3, value3);
|
||||
/// </pre>
|
||||
class CRYPTOPP_DLL AlgorithmParameters : public NameValuePairs
|
||||
{
|
||||
public:
|
||||
/// \brief Construct a AlgorithmParameters
|
||||
/// \note A NameValuePairs object containing an arbitrary number of name value pairs may be constructed by
|
||||
/// repeatedly using operator() on the object returned by MakeParameters, for example:
|
||||
/// <pre>
|
||||
/// AlgorithmParameters parameters = MakeParameters(name1, value1)(name2, value2)(name3, value3);
|
||||
/// </pre>
|
||||
AlgorithmParameters();
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
/// \brief Construct a AlgorithmParameters
|
||||
/// \tparam T the class or type
|
||||
/// \param name the name of the object or value to retrieve
|
||||
/// \param value reference to a variable that receives the value
|
||||
/// \param throwIfNotUsed if true, the object will throw an exception if the value is not accessed
|
||||
/// \note throwIfNotUsed is ignored if using a compiler that does not support std::uncaught_exception(),
|
||||
/// such as MSVC 7.0 and earlier.
|
||||
/// \note A NameValuePairs object containing an arbitrary number of name value pairs may be constructed by
|
||||
/// repeatedly using operator() on the object returned by MakeParameters, for example:
|
||||
/// <pre>
|
||||
/// AlgorithmParameters parameters = MakeParameters(name1, value1)(name2, value2)(name3, value3);
|
||||
/// </pre>
|
||||
template <class T>
|
||||
AlgorithmParameters(const char *name, const T &value, bool throwIfNotUsed=true)
|
||||
: m_next(new AlgorithmParametersTemplate<T>(name, value, throwIfNotUsed))
|
||||
, m_defaultThrowIfNotUsed(throwIfNotUsed)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
AlgorithmParameters(const AlgorithmParameters &x);
|
||||
|
||||
AlgorithmParameters & operator=(const AlgorithmParameters &x);
|
||||
|
||||
/// \tparam T the class or type
|
||||
/// \param name the name of the object or value to retrieve
|
||||
/// \param value reference to a variable that receives the value
|
||||
/// \param throwIfNotUsed if true, the object will throw an exception if the value is not accessed
|
||||
template <class T>
|
||||
AlgorithmParameters & operator()(const char *name, const T &value, bool throwIfNotUsed)
|
||||
{
|
||||
member_ptr<AlgorithmParametersBase> p(new AlgorithmParametersTemplate<T>(name, value, throwIfNotUsed));
|
||||
p->m_next.reset(m_next.release());
|
||||
m_next.reset(p.release());
|
||||
m_defaultThrowIfNotUsed = throwIfNotUsed;
|
||||
return *this;
|
||||
}
|
||||
|
||||
/// \brief Appends a NameValuePair to a collection of NameValuePairs
|
||||
/// \tparam T the class or type
|
||||
/// \param name the name of the object or value to retrieve
|
||||
/// \param value reference to a variable that receives the value
|
||||
template <class T>
|
||||
AlgorithmParameters & operator()(const char *name, const T &value)
|
||||
{
|
||||
return operator()(name, value, m_defaultThrowIfNotUsed);
|
||||
}
|
||||
|
||||
bool GetVoidValue(const char *name, const std::type_info &valueType, void *pValue) const;
|
||||
|
||||
protected:
|
||||
member_ptr<AlgorithmParametersBase> m_next;
|
||||
bool m_defaultThrowIfNotUsed;
|
||||
};
|
||||
|
||||
/// \brief Create an object that implements NameValuePairs
|
||||
/// \tparam T the class or type
|
||||
/// \param name the name of the object or value to retrieve
|
||||
/// \param value reference to a variable that receives the value
|
||||
/// \param throwIfNotUsed if true, the object will throw an exception if the value is not accessed
|
||||
/// \note throwIfNotUsed is ignored if using a compiler that does not support std::uncaught_exception(),
|
||||
/// such as MSVC 7.0 and earlier.
|
||||
/// \note A NameValuePairs object containing an arbitrary number of name value pairs may be constructed by
|
||||
/// repeatedly using \p operator() on the object returned by \p MakeParameters, for example:
|
||||
/// <pre>
|
||||
/// AlgorithmParameters parameters = MakeParameters(name1, value1)(name2, value2)(name3, value3);
|
||||
/// </pre>
|
||||
#ifdef __BORLANDC__
|
||||
typedef AlgorithmParameters MakeParameters;
|
||||
#else
|
||||
template <class T>
|
||||
AlgorithmParameters MakeParameters(const char *name, const T &value, bool throwIfNotUsed = true)
|
||||
{
|
||||
return AlgorithmParameters()(name, value, throwIfNotUsed);
|
||||
}
|
||||
#endif
|
||||
|
||||
#define CRYPTOPP_GET_FUNCTION_ENTRY(name) (Name::name(), &ThisClass::Get##name)
|
||||
#define CRYPTOPP_SET_FUNCTION_ENTRY(name) (Name::name(), &ThisClass::Set##name)
|
||||
#define CRYPTOPP_SET_FUNCTION_ENTRY2(name1, name2) (Name::name1(), Name::name2(), &ThisClass::Set##name1##And##name2)
|
||||
|
||||
NAMESPACE_END
|
||||
|
||||
#endif
|
||||
@ -0,0 +1,74 @@
|
||||
// allocate.h - written and placed in the public domain by Jeffrey Walton
|
||||
|
||||
// The functions in allocate.h and allocate.cpp were originally in misc.h
|
||||
// and misc.cpp. They were extracted in September 2019 to sidestep a circular
|
||||
// dependency with misc.h and secblock.h.
|
||||
|
||||
/// \file allocate.h
|
||||
/// \brief Functions for allocating aligned buffers
|
||||
|
||||
#ifndef CRYPTOPP_ALLOCATE_H
|
||||
#define CRYPTOPP_ALLOCATE_H
|
||||
|
||||
#include "config.h"
|
||||
#include "cryptlib.h"
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
/// \brief Attempts to reclaim unused memory
|
||||
/// \throw bad_alloc
|
||||
/// \details In the normal course of running a program, a request for memory
|
||||
/// normally succeeds. If a call to AlignedAllocate or UnalignedAllocate fails,
|
||||
/// then CallNewHandler is called in n effort to recover. Internally,
|
||||
/// CallNewHandler calls set_new_handler(nullptr) in an effort to free memory.
|
||||
/// There is no guarantee CallNewHandler will be able to obtain more memory so
|
||||
/// an allocation succeeds. If the call to set_new_handler fails, then CallNewHandler
|
||||
/// throws a bad_alloc exception.
|
||||
/// \throw bad_alloc on failure
|
||||
/// \since Crypto++ 5.0
|
||||
/// \sa AlignedAllocate, AlignedDeallocate, UnalignedAllocate, UnalignedDeallocate
|
||||
CRYPTOPP_DLL void CRYPTOPP_API CallNewHandler();
|
||||
|
||||
/// \brief Allocates a buffer on 16-byte boundary
|
||||
/// \param size the size of the buffer
|
||||
/// \details AlignedAllocate is primarily used when the data will be
|
||||
/// processed by SSE, NEON, ARMv8 or PowerPC instructions. The assembly
|
||||
/// language routines rely on the alignment. If the alignment is not
|
||||
/// respected, then a SIGBUS could be generated on Unix and Linux, and an
|
||||
/// EXCEPTION_DATATYPE_MISALIGNMENT could be generated on Windows.
|
||||
/// \details Formerly, AlignedAllocate and AlignedDeallocate were only
|
||||
/// available on certain platforms when CRYTPOPP_DISABLE_ASM was not in
|
||||
/// effect. However, Android and iOS debug simulator builds got into a
|
||||
/// state where the aligned allocator was not available and caused link
|
||||
/// failures.
|
||||
/// \since AlignedAllocate for SIMD since Crypto++ 1.0, AlignedAllocate
|
||||
/// for all builds since Crypto++ 8.1
|
||||
/// \sa AlignedDeallocate, UnalignedAllocate, UnalignedDeallocate, CallNewHandler,
|
||||
/// <A HREF="http://github.com/weidai11/cryptopp/issues/779">Issue 779</A>
|
||||
CRYPTOPP_DLL void* CRYPTOPP_API AlignedAllocate(size_t size);
|
||||
|
||||
/// \brief Frees a buffer allocated with AlignedAllocate
|
||||
/// \param ptr the buffer to free
|
||||
/// \since AlignedDeallocate for SIMD since Crypto++ 1.0, AlignedAllocate
|
||||
/// for all builds since Crypto++ 8.1
|
||||
/// \sa AlignedAllocate, UnalignedAllocate, UnalignedDeallocate, CallNewHandler,
|
||||
/// <A HREF="http://github.com/weidai11/cryptopp/issues/779">Issue 779</A>
|
||||
CRYPTOPP_DLL void CRYPTOPP_API AlignedDeallocate(void *ptr);
|
||||
|
||||
/// \brief Allocates a buffer
|
||||
/// \param size the size of the buffer
|
||||
/// \since Crypto++ 1.0
|
||||
/// \sa AlignedAllocate, AlignedDeallocate, UnalignedDeallocate, CallNewHandler,
|
||||
/// <A HREF="http://github.com/weidai11/cryptopp/issues/779">Issue 779</A>
|
||||
CRYPTOPP_DLL void * CRYPTOPP_API UnalignedAllocate(size_t size);
|
||||
|
||||
/// \brief Frees a buffer allocated with UnalignedAllocate
|
||||
/// \param ptr the buffer to free
|
||||
/// \since Crypto++ 1.0
|
||||
/// \sa AlignedAllocate, AlignedDeallocate, UnalignedAllocate, CallNewHandler,
|
||||
/// <A HREF="http://github.com/weidai11/cryptopp/issues/779">Issue 779</A>
|
||||
CRYPTOPP_DLL void CRYPTOPP_API UnalignedDeallocate(void *ptr);
|
||||
|
||||
NAMESPACE_END
|
||||
|
||||
#endif // CRYPTOPP_ALLOCATE_H
|
||||
@ -0,0 +1,89 @@
|
||||
// arc4.h - originally written and placed in the public domain by Wei Dai
|
||||
|
||||
/// \file arc4.h
|
||||
/// \brief Classes for ARC4 cipher
|
||||
/// \since Crypto++ 3.1
|
||||
|
||||
#ifndef CRYPTOPP_ARC4_H
|
||||
#define CRYPTOPP_ARC4_H
|
||||
|
||||
#include "cryptlib.h"
|
||||
#include "strciphr.h"
|
||||
#include "secblock.h"
|
||||
#include "smartptr.h"
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
namespace Weak1 {
|
||||
|
||||
/// \brief ARC4 base class
|
||||
/// \details Implementations and overrides in \p Base apply to both \p ENCRYPTION and \p DECRYPTION directions
|
||||
/// \since Crypto++ 3.1
|
||||
class CRYPTOPP_NO_VTABLE ARC4_Base : public VariableKeyLength<16, 1, 256>, public RandomNumberGenerator, public SymmetricCipher, public SymmetricCipherDocumentation
|
||||
{
|
||||
public:
|
||||
~ARC4_Base();
|
||||
|
||||
CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "ARC4";}
|
||||
|
||||
void GenerateBlock(byte *output, size_t size);
|
||||
void DiscardBytes(size_t n);
|
||||
|
||||
void ProcessData(byte *outString, const byte *inString, size_t length);
|
||||
|
||||
bool IsRandomAccess() const {return false;}
|
||||
bool IsSelfInverting() const {return true;}
|
||||
bool IsForwardTransformation() const {return true;}
|
||||
|
||||
typedef SymmetricCipherFinal<ARC4_Base> Encryption;
|
||||
typedef SymmetricCipherFinal<ARC4_Base> Decryption;
|
||||
|
||||
protected:
|
||||
void UncheckedSetKey(const byte *key, unsigned int length, const NameValuePairs ¶ms);
|
||||
virtual unsigned int GetDefaultDiscardBytes() const {return 0;}
|
||||
|
||||
FixedSizeSecBlock<byte, 256> m_state;
|
||||
byte m_x, m_y;
|
||||
};
|
||||
|
||||
/// \brief Alleged RC4
|
||||
/// \sa <a href="http://www.cryptopp.com/wiki/RC4">Alleged RC4</a>
|
||||
/// \since Crypto++ 3.1
|
||||
DOCUMENTED_TYPEDEF(SymmetricCipherFinal<ARC4_Base>, ARC4);
|
||||
|
||||
/// \brief MARC4 base class
|
||||
/// \details Implementations and overrides in \p Base apply to both \p ENCRYPTION and \p DECRYPTION directions
|
||||
/// \details MARC4 discards the first 256 bytes of keystream, which may be weaker than the rest
|
||||
/// \since Crypto++ 3.1
|
||||
class CRYPTOPP_NO_VTABLE MARC4_Base : public ARC4_Base
|
||||
{
|
||||
public:
|
||||
CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "MARC4";}
|
||||
|
||||
typedef SymmetricCipherFinal<MARC4_Base> Encryption;
|
||||
typedef SymmetricCipherFinal<MARC4_Base> Decryption;
|
||||
|
||||
protected:
|
||||
unsigned int GetDefaultDiscardBytes() const {return 256;}
|
||||
};
|
||||
|
||||
/// \brief Modified Alleged RC4
|
||||
/// \sa <a href="http://www.cryptopp.com/wiki/RC4">Alleged RC4</a>
|
||||
/// \since Crypto++ 3.1
|
||||
DOCUMENTED_TYPEDEF(SymmetricCipherFinal<MARC4_Base>, MARC4);
|
||||
|
||||
}
|
||||
#if CRYPTOPP_ENABLE_NAMESPACE_WEAK >= 1
|
||||
namespace Weak {using namespace Weak1;} // import Weak1 into CryptoPP::Weak
|
||||
#else
|
||||
using namespace Weak1; // import Weak1 into CryptoPP with warning
|
||||
#ifdef __GNUC__
|
||||
#warning "You may be using a weak algorithm that has been retained for backwards compatibility. Please '#define CRYPTOPP_ENABLE_NAMESPACE_WEAK 1' before including this .h file and prepend the class name with 'Weak::' to remove this warning."
|
||||
#else
|
||||
#pragma message("You may be using a weak algorithm that has been retained for backwards compatibility. Please '#define CRYPTOPP_ENABLE_NAMESPACE_WEAK 1' before including this .h file and prepend the class name with 'Weak::' to remove this warning.")
|
||||
#endif
|
||||
#endif
|
||||
|
||||
NAMESPACE_END
|
||||
|
||||
#endif
|
||||
@ -0,0 +1,99 @@
|
||||
// argnames.h - originally written and placed in the public domain by Wei Dai
|
||||
|
||||
/// \file argnames.h
|
||||
/// \brief Standard names for retrieving values by name when working with \p NameValuePairs
|
||||
|
||||
#ifndef CRYPTOPP_ARGNAMES_H
|
||||
#define CRYPTOPP_ARGNAMES_H
|
||||
|
||||
#include "cryptlib.h"
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
DOCUMENTED_NAMESPACE_BEGIN(Name)
|
||||
|
||||
#define CRYPTOPP_DEFINE_NAME_STRING(name) inline const char *name() {return #name;}
|
||||
|
||||
CRYPTOPP_DEFINE_NAME_STRING(ValueNames) ///< string, a list of value names with a semicolon (';') after each name
|
||||
CRYPTOPP_DEFINE_NAME_STRING(Version) ///< int
|
||||
CRYPTOPP_DEFINE_NAME_STRING(Seed) ///< ConstByteArrayParameter
|
||||
CRYPTOPP_DEFINE_NAME_STRING(Key) ///< ConstByteArrayParameter
|
||||
CRYPTOPP_DEFINE_NAME_STRING(IV) ///< ConstByteArrayParameter, also accepts const byte * for backwards compatibility
|
||||
CRYPTOPP_DEFINE_NAME_STRING(StolenIV) ///< byte *
|
||||
CRYPTOPP_DEFINE_NAME_STRING(Nonce) ///< ConstByteArrayParameter
|
||||
CRYPTOPP_DEFINE_NAME_STRING(Rounds) ///< int
|
||||
CRYPTOPP_DEFINE_NAME_STRING(FeedbackSize) ///< int
|
||||
CRYPTOPP_DEFINE_NAME_STRING(WordSize) ///< int, in bytes
|
||||
CRYPTOPP_DEFINE_NAME_STRING(BlockSize) ///< int, in bytes
|
||||
CRYPTOPP_DEFINE_NAME_STRING(EffectiveKeyLength) ///< int, in bits
|
||||
CRYPTOPP_DEFINE_NAME_STRING(KeySize) ///< int, in bits
|
||||
CRYPTOPP_DEFINE_NAME_STRING(ModulusSize) ///< int, in bits
|
||||
CRYPTOPP_DEFINE_NAME_STRING(SubgroupOrderSize) ///< int, in bits
|
||||
CRYPTOPP_DEFINE_NAME_STRING(PrivateExponentSize)///< int, in bits
|
||||
CRYPTOPP_DEFINE_NAME_STRING(Modulus) ///< Integer
|
||||
CRYPTOPP_DEFINE_NAME_STRING(PublicExponent) ///< Integer
|
||||
CRYPTOPP_DEFINE_NAME_STRING(PrivateExponent) ///< Integer
|
||||
CRYPTOPP_DEFINE_NAME_STRING(PublicElement) ///< Integer
|
||||
CRYPTOPP_DEFINE_NAME_STRING(SubgroupOrder) ///< Integer
|
||||
CRYPTOPP_DEFINE_NAME_STRING(Cofactor) ///< Integer
|
||||
CRYPTOPP_DEFINE_NAME_STRING(SubgroupGenerator) ///< Integer, ECP::Point, or EC2N::Point
|
||||
CRYPTOPP_DEFINE_NAME_STRING(Curve) ///< ECP or EC2N
|
||||
CRYPTOPP_DEFINE_NAME_STRING(GroupOID) ///< OID
|
||||
CRYPTOPP_DEFINE_NAME_STRING(PointerToPrimeSelector) ///< const PrimeSelector *
|
||||
CRYPTOPP_DEFINE_NAME_STRING(Prime1) ///< Integer
|
||||
CRYPTOPP_DEFINE_NAME_STRING(Prime2) ///< Integer
|
||||
CRYPTOPP_DEFINE_NAME_STRING(ModPrime1PrivateExponent) ///< Integer
|
||||
CRYPTOPP_DEFINE_NAME_STRING(ModPrime2PrivateExponent) ///< Integer
|
||||
CRYPTOPP_DEFINE_NAME_STRING(MultiplicativeInverseOfPrime2ModPrime1) ///< Integer
|
||||
CRYPTOPP_DEFINE_NAME_STRING(QuadraticResidueModPrime1) ///< Integer
|
||||
CRYPTOPP_DEFINE_NAME_STRING(QuadraticResidueModPrime2) ///< Integer
|
||||
CRYPTOPP_DEFINE_NAME_STRING(PutMessage) ///< bool
|
||||
CRYPTOPP_DEFINE_NAME_STRING(TruncatedDigestSize) ///< int
|
||||
CRYPTOPP_DEFINE_NAME_STRING(BlockPaddingScheme) ///< StreamTransformationFilter::BlockPaddingScheme
|
||||
CRYPTOPP_DEFINE_NAME_STRING(HashVerificationFilterFlags) ///< word32
|
||||
CRYPTOPP_DEFINE_NAME_STRING(AuthenticatedDecryptionFilterFlags) ///< word32
|
||||
CRYPTOPP_DEFINE_NAME_STRING(SignatureVerificationFilterFlags) ///< word32
|
||||
CRYPTOPP_DEFINE_NAME_STRING(InputBuffer) ///< ConstByteArrayParameter
|
||||
CRYPTOPP_DEFINE_NAME_STRING(OutputBuffer) ///< ByteArrayParameter
|
||||
CRYPTOPP_DEFINE_NAME_STRING(InputFileName) ///< const char *
|
||||
CRYPTOPP_DEFINE_NAME_STRING(InputFileNameWide) ///< const wchar_t *
|
||||
CRYPTOPP_DEFINE_NAME_STRING(InputStreamPointer) ///< std::istream *
|
||||
CRYPTOPP_DEFINE_NAME_STRING(InputBinaryMode) ///< bool
|
||||
CRYPTOPP_DEFINE_NAME_STRING(OutputFileName) ///< const char *
|
||||
CRYPTOPP_DEFINE_NAME_STRING(OutputFileNameWide) ///< const wchar_t *
|
||||
CRYPTOPP_DEFINE_NAME_STRING(OutputStreamPointer) ///< std::ostream *
|
||||
CRYPTOPP_DEFINE_NAME_STRING(OutputBinaryMode) ///< bool
|
||||
CRYPTOPP_DEFINE_NAME_STRING(EncodingParameters) ///< ConstByteArrayParameter
|
||||
CRYPTOPP_DEFINE_NAME_STRING(KeyDerivationParameters) ///< ConstByteArrayParameter
|
||||
CRYPTOPP_DEFINE_NAME_STRING(Separator) ///< ConstByteArrayParameter
|
||||
CRYPTOPP_DEFINE_NAME_STRING(Terminator) ///< ConstByteArrayParameter
|
||||
CRYPTOPP_DEFINE_NAME_STRING(Uppercase) ///< bool
|
||||
CRYPTOPP_DEFINE_NAME_STRING(GroupSize) ///< int
|
||||
CRYPTOPP_DEFINE_NAME_STRING(Pad) ///< bool
|
||||
CRYPTOPP_DEFINE_NAME_STRING(PaddingByte) ///< byte
|
||||
CRYPTOPP_DEFINE_NAME_STRING(Log2Base) ///< int
|
||||
CRYPTOPP_DEFINE_NAME_STRING(EncodingLookupArray) ///< const byte *
|
||||
CRYPTOPP_DEFINE_NAME_STRING(DecodingLookupArray) ///< const byte *
|
||||
CRYPTOPP_DEFINE_NAME_STRING(InsertLineBreaks) ///< bool
|
||||
CRYPTOPP_DEFINE_NAME_STRING(MaxLineLength) ///< int
|
||||
CRYPTOPP_DEFINE_NAME_STRING(DigestSize) ///< int, in bytes
|
||||
CRYPTOPP_DEFINE_NAME_STRING(L1KeyLength) ///< int, in bytes
|
||||
CRYPTOPP_DEFINE_NAME_STRING(TableSize) ///< int, in bytes
|
||||
CRYPTOPP_DEFINE_NAME_STRING(Blinding) ///< bool, timing attack mitigations, ON by default
|
||||
CRYPTOPP_DEFINE_NAME_STRING(DerivedKey) ///< ByteArrayParameter, key derivation, derived key
|
||||
CRYPTOPP_DEFINE_NAME_STRING(DerivedKeyLength) ///< int, key derivation, derived key length in bytes
|
||||
CRYPTOPP_DEFINE_NAME_STRING(Personalization) ///< ConstByteArrayParameter
|
||||
CRYPTOPP_DEFINE_NAME_STRING(PersonalizationSize) ///< int, in bytes
|
||||
CRYPTOPP_DEFINE_NAME_STRING(Salt) ///< ConstByteArrayParameter
|
||||
CRYPTOPP_DEFINE_NAME_STRING(Tweak) ///< ConstByteArrayParameter
|
||||
CRYPTOPP_DEFINE_NAME_STRING(SaltSize) ///< int, in bytes
|
||||
CRYPTOPP_DEFINE_NAME_STRING(TreeMode) ///< byte
|
||||
CRYPTOPP_DEFINE_NAME_STRING(FileName) ///< const char *
|
||||
CRYPTOPP_DEFINE_NAME_STRING(FileTime) ///< int
|
||||
CRYPTOPP_DEFINE_NAME_STRING(Comment) ///< const char *
|
||||
CRYPTOPP_DEFINE_NAME_STRING(Identity) ///< ConstByteArrayParameter
|
||||
DOCUMENTED_NAMESPACE_END
|
||||
|
||||
NAMESPACE_END
|
||||
|
||||
#endif
|
||||
@ -0,0 +1,71 @@
|
||||
// aria.h - written and placed in the public domain by Jeffrey Walton
|
||||
|
||||
/// \file aria.h
|
||||
/// \brief Classes for the ARIA block cipher
|
||||
/// \details The Crypto++ ARIA implementation is based on the 32-bit implementation by Aaram Yun
|
||||
/// from the National Security Research Institute, KOREA. Aaram Yun's implementation is based on
|
||||
/// the 8-bit implementation by Jin Hong. The source files are available in ARIA.zip from the Korea
|
||||
/// Internet & Security Agency website.
|
||||
/// \sa <A HREF="http://tools.ietf.org/html/rfc5794">RFC 5794, A Description of the ARIA Encryption Algorithm</A>,
|
||||
/// <A HREF="http://seed.kisa.or.kr/iwt/ko/bbs/EgovReferenceList.do?bbsId=BBSMSTR_000000000002">Korea
|
||||
/// Internet & Security Agency homepage</A>
|
||||
|
||||
#ifndef CRYPTOPP_ARIA_H
|
||||
#define CRYPTOPP_ARIA_H
|
||||
|
||||
#include "config.h"
|
||||
#include "seckey.h"
|
||||
#include "secblock.h"
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
/// \brief ARIA block cipher information
|
||||
/// \since Crypto++ 6.0
|
||||
struct ARIA_Info : public FixedBlockSize<16>, public VariableKeyLength<16, 16, 32, 8>
|
||||
{
|
||||
CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "ARIA";}
|
||||
};
|
||||
|
||||
/// \brief ARIA block cipher
|
||||
/// \details The Crypto++ ARIA implementation is based on the 32-bit implementation by Aaram Yun
|
||||
/// from the National Security Research Institute, KOREA. Aaram Yun's implementation is based on
|
||||
/// the 8-bit implementation by Jin Hong. The source files are available in ARIA.zip from the Korea
|
||||
/// Internet & Security Agency website.
|
||||
/// \sa <A HREF="http://tools.ietf.org/html/rfc5794">RFC 5794, A Description of the ARIA Encryption Algorithm</A>,
|
||||
/// <A HREF="http://seed.kisa.or.kr/iwt/ko/bbs/EgovReferenceList.do?bbsId=BBSMSTR_000000000002">Korea
|
||||
/// Internet & Security Agency homepage</A>
|
||||
/// \sa <a href="http://www.cryptopp.com/wiki/ARIA">ARIA</a>
|
||||
/// \since Crypto++ 6.0
|
||||
class ARIA : public ARIA_Info, public BlockCipherDocumentation
|
||||
{
|
||||
public:
|
||||
class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<ARIA_Info>
|
||||
{
|
||||
public:
|
||||
Base() : m_rounds(0) {}
|
||||
|
||||
protected:
|
||||
void UncheckedSetKey(const byte *key, unsigned int keylen, const NameValuePairs ¶ms);
|
||||
void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
|
||||
|
||||
private:
|
||||
// Reference implementation allocates a table of 17 round keys.
|
||||
typedef SecBlock<byte, AllocatorWithCleanup<byte, true> > AlignedByteBlock;
|
||||
typedef SecBlock<word32, AllocatorWithCleanup<word32, true> > AlignedWordBlock;
|
||||
|
||||
AlignedWordBlock m_rk; // round keys
|
||||
AlignedWordBlock m_w; // w0, w1, w2, w3, t and u
|
||||
unsigned int m_rounds;
|
||||
};
|
||||
|
||||
public:
|
||||
typedef BlockCipherFinal<ENCRYPTION, Base> Encryption;
|
||||
typedef BlockCipherFinal<DECRYPTION, Base> Decryption;
|
||||
};
|
||||
|
||||
typedef ARIA::Encryption ARIAEncryption;
|
||||
typedef ARIA::Decryption ARIADecryption;
|
||||
|
||||
NAMESPACE_END
|
||||
|
||||
#endif
|
||||
@ -0,0 +1,427 @@
|
||||
// arm_simd.h - written and placed in public domain by Jeffrey Walton
|
||||
|
||||
/// \file arm_simd.h
|
||||
/// \brief Support functions for ARM and vector operations
|
||||
|
||||
#ifndef CRYPTOPP_ARM_SIMD_H
|
||||
#define CRYPTOPP_ARM_SIMD_H
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#if (CRYPTOPP_ARM_NEON_HEADER)
|
||||
# include <stdint.h>
|
||||
# include <arm_neon.h>
|
||||
#endif
|
||||
|
||||
#if (CRYPTOPP_ARM_ACLE_HEADER)
|
||||
# include <stdint.h>
|
||||
# include <arm_acle.h>
|
||||
#endif
|
||||
|
||||
#if (CRYPTOPP_ARM_CRC32_AVAILABLE) || defined(CRYPTOPP_DOXYGEN_PROCESSING)
|
||||
/// \name CRC32 checksum
|
||||
//@{
|
||||
|
||||
/// \brief CRC32 checksum
|
||||
/// \param crc the starting crc value
|
||||
/// \param val the value to checksum
|
||||
/// \return CRC32 value
|
||||
/// \since Crypto++ 8.6
|
||||
inline uint32_t CRC32B (uint32_t crc, uint8_t val)
|
||||
{
|
||||
#if defined(CRYPTOPP_MSC_VERSION)
|
||||
return __crc32b(crc, val);
|
||||
#else
|
||||
__asm__ ("crc32b %w0, %w0, %w1 \n\t"
|
||||
:"+r" (crc) : "r" (val) );
|
||||
return crc;
|
||||
#endif
|
||||
}
|
||||
|
||||
/// \brief CRC32 checksum
|
||||
/// \param crc the starting crc value
|
||||
/// \param val the value to checksum
|
||||
/// \return CRC32 value
|
||||
/// \since Crypto++ 8.6
|
||||
inline uint32_t CRC32W (uint32_t crc, uint32_t val)
|
||||
{
|
||||
#if defined(CRYPTOPP_MSC_VERSION)
|
||||
return __crc32w(crc, val);
|
||||
#else
|
||||
__asm__ ("crc32w %w0, %w0, %w1 \n\t"
|
||||
:"+r" (crc) : "r" (val) );
|
||||
return crc;
|
||||
#endif
|
||||
}
|
||||
|
||||
/// \brief CRC32 checksum
|
||||
/// \param crc the starting crc value
|
||||
/// \param vals the values to checksum
|
||||
/// \return CRC32 value
|
||||
/// \since Crypto++ 8.6
|
||||
inline uint32_t CRC32Wx4 (uint32_t crc, const uint32_t vals[4])
|
||||
{
|
||||
#if defined(CRYPTOPP_MSC_VERSION)
|
||||
return __crc32w(__crc32w(__crc32w(__crc32w(
|
||||
crc, vals[0]), vals[1]), vals[2]), vals[3]);
|
||||
#else
|
||||
__asm__ ("crc32w %w0, %w0, %w1 \n\t"
|
||||
"crc32w %w0, %w0, %w2 \n\t"
|
||||
"crc32w %w0, %w0, %w3 \n\t"
|
||||
"crc32w %w0, %w0, %w4 \n\t"
|
||||
:"+r" (crc) : "r" (vals[0]), "r" (vals[1]),
|
||||
"r" (vals[2]), "r" (vals[3]));
|
||||
return crc;
|
||||
#endif
|
||||
}
|
||||
|
||||
//@}
|
||||
/// \name CRC32-C checksum
|
||||
|
||||
/// \brief CRC32-C checksum
|
||||
/// \param crc the starting crc value
|
||||
/// \param val the value to checksum
|
||||
/// \return CRC32-C value
|
||||
/// \since Crypto++ 8.6
|
||||
inline uint32_t CRC32CB (uint32_t crc, uint8_t val)
|
||||
{
|
||||
#if defined(CRYPTOPP_MSC_VERSION)
|
||||
return __crc32cb(crc, val);
|
||||
#else
|
||||
__asm__ ("crc32cb %w0, %w0, %w1 \n\t"
|
||||
:"+r" (crc) : "r" (val) );
|
||||
return crc;
|
||||
#endif
|
||||
}
|
||||
|
||||
/// \brief CRC32-C checksum
|
||||
/// \param crc the starting crc value
|
||||
/// \param val the value to checksum
|
||||
/// \return CRC32-C value
|
||||
/// \since Crypto++ 8.6
|
||||
inline uint32_t CRC32CW (uint32_t crc, uint32_t val)
|
||||
{
|
||||
#if defined(CRYPTOPP_MSC_VERSION)
|
||||
return __crc32cw(crc, val);
|
||||
#else
|
||||
__asm__ ("crc32cw %w0, %w0, %w1 \n\t"
|
||||
:"+r" (crc) : "r" (val) );
|
||||
return crc;
|
||||
#endif
|
||||
}
|
||||
|
||||
/// \brief CRC32-C checksum
|
||||
/// \param crc the starting crc value
|
||||
/// \param vals the values to checksum
|
||||
/// \return CRC32-C value
|
||||
/// \since Crypto++ 8.6
|
||||
inline uint32_t CRC32CWx4 (uint32_t crc, const uint32_t vals[4])
|
||||
{
|
||||
#if defined(CRYPTOPP_MSC_VERSION)
|
||||
return __crc32cw(__crc32cw(__crc32cw(__crc32cw(
|
||||
crc, vals[0]), vals[1]), vals[2]), vals[3]);
|
||||
#else
|
||||
__asm__ ("crc32cw %w0, %w0, %w1 \n\t"
|
||||
"crc32cw %w0, %w0, %w2 \n\t"
|
||||
"crc32cw %w0, %w0, %w3 \n\t"
|
||||
"crc32cw %w0, %w0, %w4 \n\t"
|
||||
:"+r" (crc) : "r" (vals[0]), "r" (vals[1]),
|
||||
"r" (vals[2]), "r" (vals[3]));
|
||||
return crc;
|
||||
#endif
|
||||
}
|
||||
//@}
|
||||
#endif // CRYPTOPP_ARM_CRC32_AVAILABLE
|
||||
|
||||
#if (CRYPTOPP_ARM_PMULL_AVAILABLE) || defined(CRYPTOPP_DOXYGEN_PROCESSING)
|
||||
/// \name Polynomial multiplication
|
||||
//@{
|
||||
|
||||
/// \brief Polynomial multiplication
|
||||
/// \param a the first value
|
||||
/// \param b the second value
|
||||
/// \return vector product
|
||||
/// \details PMULL_00() performs polynomial multiplication and presents
|
||||
/// the result like Intel's <tt>c = _mm_clmulepi64_si128(a, b, 0x00)</tt>.
|
||||
/// The <tt>0x00</tt> indicates the low 64-bits of <tt>a</tt> and <tt>b</tt>
|
||||
/// are multiplied.
|
||||
/// \note An Intel XMM register is composed of 128-bits. The leftmost bit
|
||||
/// is MSB and numbered 127, while the rightmost bit is LSB and
|
||||
/// numbered 0.
|
||||
/// \since Crypto++ 8.0
|
||||
inline uint64x2_t PMULL_00(const uint64x2_t a, const uint64x2_t b)
|
||||
{
|
||||
#if defined(CRYPTOPP_MSC_VERSION)
|
||||
const __n64 x = { vgetq_lane_u64(a, 0) };
|
||||
const __n64 y = { vgetq_lane_u64(b, 0) };
|
||||
return vmull_p64(x, y);
|
||||
#elif defined(__GNUC__)
|
||||
uint64x2_t r;
|
||||
__asm__ ("pmull %0.1q, %1.1d, %2.1d \n\t"
|
||||
:"=w" (r) : "w" (a), "w" (b) );
|
||||
return r;
|
||||
#else
|
||||
return (uint64x2_t)(vmull_p64(
|
||||
vgetq_lane_u64(vreinterpretq_u64_u8(a),0),
|
||||
vgetq_lane_u64(vreinterpretq_u64_u8(b),0)));
|
||||
#endif
|
||||
}
|
||||
|
||||
/// \brief Polynomial multiplication
|
||||
/// \param a the first value
|
||||
/// \param b the second value
|
||||
/// \return vector product
|
||||
/// \details PMULL_01 performs() polynomial multiplication and presents
|
||||
/// the result like Intel's <tt>c = _mm_clmulepi64_si128(a, b, 0x01)</tt>.
|
||||
/// The <tt>0x01</tt> indicates the low 64-bits of <tt>a</tt> and high
|
||||
/// 64-bits of <tt>b</tt> are multiplied.
|
||||
/// \note An Intel XMM register is composed of 128-bits. The leftmost bit
|
||||
/// is MSB and numbered 127, while the rightmost bit is LSB and
|
||||
/// numbered 0.
|
||||
/// \since Crypto++ 8.0
|
||||
inline uint64x2_t PMULL_01(const uint64x2_t a, const uint64x2_t b)
|
||||
{
|
||||
#if defined(CRYPTOPP_MSC_VERSION)
|
||||
const __n64 x = { vgetq_lane_u64(a, 0) };
|
||||
const __n64 y = { vgetq_lane_u64(b, 1) };
|
||||
return vmull_p64(x, y);
|
||||
#elif defined(__GNUC__)
|
||||
uint64x2_t r;
|
||||
__asm__ ("pmull %0.1q, %1.1d, %2.1d \n\t"
|
||||
:"=w" (r) : "w" (a), "w" (vget_high_u64(b)) );
|
||||
return r;
|
||||
#else
|
||||
return (uint64x2_t)(vmull_p64(
|
||||
vgetq_lane_u64(vreinterpretq_u64_u8(a),0),
|
||||
vgetq_lane_u64(vreinterpretq_u64_u8(b),1)));
|
||||
#endif
|
||||
}
|
||||
|
||||
/// \brief Polynomial multiplication
|
||||
/// \param a the first value
|
||||
/// \param b the second value
|
||||
/// \return vector product
|
||||
/// \details PMULL_10() performs polynomial multiplication and presents
|
||||
/// the result like Intel's <tt>c = _mm_clmulepi64_si128(a, b, 0x10)</tt>.
|
||||
/// The <tt>0x10</tt> indicates the high 64-bits of <tt>a</tt> and low
|
||||
/// 64-bits of <tt>b</tt> are multiplied.
|
||||
/// \note An Intel XMM register is composed of 128-bits. The leftmost bit
|
||||
/// is MSB and numbered 127, while the rightmost bit is LSB and
|
||||
/// numbered 0.
|
||||
/// \since Crypto++ 8.0
|
||||
inline uint64x2_t PMULL_10(const uint64x2_t a, const uint64x2_t b)
|
||||
{
|
||||
#if defined(CRYPTOPP_MSC_VERSION)
|
||||
const __n64 x = { vgetq_lane_u64(a, 1) };
|
||||
const __n64 y = { vgetq_lane_u64(b, 0) };
|
||||
return vmull_p64(x, y);
|
||||
#elif defined(__GNUC__)
|
||||
uint64x2_t r;
|
||||
__asm__ ("pmull %0.1q, %1.1d, %2.1d \n\t"
|
||||
:"=w" (r) : "w" (vget_high_u64(a)), "w" (b) );
|
||||
return r;
|
||||
#else
|
||||
return (uint64x2_t)(vmull_p64(
|
||||
vgetq_lane_u64(vreinterpretq_u64_u8(a),1),
|
||||
vgetq_lane_u64(vreinterpretq_u64_u8(b),0)));
|
||||
#endif
|
||||
}
|
||||
|
||||
/// \brief Polynomial multiplication
|
||||
/// \param a the first value
|
||||
/// \param b the second value
|
||||
/// \return vector product
|
||||
/// \details PMULL_11() performs polynomial multiplication and presents
|
||||
/// the result like Intel's <tt>c = _mm_clmulepi64_si128(a, b, 0x11)</tt>.
|
||||
/// The <tt>0x11</tt> indicates the high 64-bits of <tt>a</tt> and <tt>b</tt>
|
||||
/// are multiplied.
|
||||
/// \note An Intel XMM register is composed of 128-bits. The leftmost bit
|
||||
/// is MSB and numbered 127, while the rightmost bit is LSB and
|
||||
/// numbered 0.
|
||||
/// \since Crypto++ 8.0
|
||||
inline uint64x2_t PMULL_11(const uint64x2_t a, const uint64x2_t b)
|
||||
{
|
||||
#if defined(CRYPTOPP_MSC_VERSION)
|
||||
const __n64 x = { vgetq_lane_u64(a, 1) };
|
||||
const __n64 y = { vgetq_lane_u64(b, 1) };
|
||||
return vmull_p64(x, y);
|
||||
#elif defined(__GNUC__)
|
||||
uint64x2_t r;
|
||||
__asm__ ("pmull2 %0.1q, %1.2d, %2.2d \n\t"
|
||||
:"=w" (r) : "w" (a), "w" (b) );
|
||||
return r;
|
||||
#else
|
||||
return (uint64x2_t)(vmull_p64(
|
||||
vgetq_lane_u64(vreinterpretq_u64_u8(a),1),
|
||||
vgetq_lane_u64(vreinterpretq_u64_u8(b),1)));
|
||||
#endif
|
||||
}
|
||||
|
||||
/// \brief Polynomial multiplication
|
||||
/// \param a the first value
|
||||
/// \param b the second value
|
||||
/// \return vector product
|
||||
/// \details PMULL() performs vmull_p64(). PMULL is provided as
|
||||
/// GCC inline assembly due to Clang and lack of support for the intrinsic.
|
||||
/// \since Crypto++ 8.0
|
||||
inline uint64x2_t PMULL(const uint64x2_t a, const uint64x2_t b)
|
||||
{
|
||||
#if defined(CRYPTOPP_MSC_VERSION)
|
||||
const __n64 x = { vgetq_lane_u64(a, 0) };
|
||||
const __n64 y = { vgetq_lane_u64(b, 0) };
|
||||
return vmull_p64(x, y);
|
||||
#elif defined(__GNUC__)
|
||||
uint64x2_t r;
|
||||
__asm__ ("pmull %0.1q, %1.1d, %2.1d \n\t"
|
||||
:"=w" (r) : "w" (a), "w" (b) );
|
||||
return r;
|
||||
#else
|
||||
return (uint64x2_t)(vmull_p64(
|
||||
vgetq_lane_u64(vreinterpretq_u64_u8(a),0),
|
||||
vgetq_lane_u64(vreinterpretq_u64_u8(b),0)));
|
||||
#endif
|
||||
}
|
||||
|
||||
/// \brief Polynomial multiplication
|
||||
/// \param a the first value
|
||||
/// \param b the second value
|
||||
/// \return vector product
|
||||
/// \details PMULL_HIGH() performs vmull_high_p64(). PMULL_HIGH is provided as
|
||||
/// GCC inline assembly due to Clang and lack of support for the intrinsic.
|
||||
/// \since Crypto++ 8.0
|
||||
inline uint64x2_t PMULL_HIGH(const uint64x2_t a, const uint64x2_t b)
|
||||
{
|
||||
#if defined(CRYPTOPP_MSC_VERSION)
|
||||
const __n64 x = { vgetq_lane_u64(a, 1) };
|
||||
const __n64 y = { vgetq_lane_u64(b, 1) };
|
||||
return vmull_p64(x, y);
|
||||
#elif defined(__GNUC__)
|
||||
uint64x2_t r;
|
||||
__asm__ ("pmull2 %0.1q, %1.2d, %2.2d \n\t"
|
||||
:"=w" (r) : "w" (a), "w" (b) );
|
||||
return r;
|
||||
#else
|
||||
return (uint64x2_t)(vmull_p64(
|
||||
vgetq_lane_u64(vreinterpretq_u64_u8(a),1),
|
||||
vgetq_lane_u64(vreinterpretq_u64_u8(b),1))));
|
||||
#endif
|
||||
}
|
||||
|
||||
/// \brief Vector extraction
|
||||
/// \tparam C the byte count
|
||||
/// \param a the first value
|
||||
/// \param b the second value
|
||||
/// \return vector
|
||||
/// \details VEXT_U8() extracts the first <tt>C</tt> bytes of vector
|
||||
/// <tt>a</tt> and the remaining bytes in <tt>b</tt>. VEXT_U8 is provided
|
||||
/// as GCC inline assembly due to Clang and lack of support for the intrinsic.
|
||||
/// \since Crypto++ 8.0
|
||||
template <unsigned int C>
|
||||
inline uint64x2_t VEXT_U8(uint64x2_t a, uint64x2_t b)
|
||||
{
|
||||
// https://github.com/weidai11/cryptopp/issues/366
|
||||
#if defined(CRYPTOPP_MSC_VERSION)
|
||||
return vreinterpretq_u64_u8(vextq_u8(
|
||||
vreinterpretq_u8_u64(a), vreinterpretq_u8_u64(b), C));
|
||||
#else
|
||||
uint64x2_t r;
|
||||
__asm__ ("ext %0.16b, %1.16b, %2.16b, %3 \n\t"
|
||||
:"=w" (r) : "w" (a), "w" (b), "I" (C) );
|
||||
return r;
|
||||
#endif
|
||||
}
|
||||
|
||||
//@}
|
||||
#endif // CRYPTOPP_ARM_PMULL_AVAILABLE
|
||||
|
||||
#if CRYPTOPP_ARM_SHA3_AVAILABLE || defined(CRYPTOPP_DOXYGEN_PROCESSING)
|
||||
/// \name ARMv8.2 operations
|
||||
//@{
|
||||
|
||||
/// \brief Three-way XOR
|
||||
/// \param a the first value
|
||||
/// \param b the second value
|
||||
/// \param c the third value
|
||||
/// \return three-way exclusive OR of the values
|
||||
/// \details VEOR3() performs veor3q_u64(). VEOR3 is provided as GCC inline assembly due
|
||||
/// to Clang and lack of support for the intrinsic.
|
||||
/// \details VEOR3 requires ARMv8.2.
|
||||
/// \since Crypto++ 8.6
|
||||
inline uint64x2_t VEOR3(uint64x2_t a, uint64x2_t b, uint64x2_t c)
|
||||
{
|
||||
#if defined(CRYPTOPP_MSC_VERSION)
|
||||
return veor3q_u64(a, b, c);
|
||||
#else
|
||||
uint64x2_t r;
|
||||
__asm__ ("eor3 %0.16b, %1.16b, %2.16b, %3.16b \n\t"
|
||||
:"=w" (r) : "w" (a), "w" (b), "w" (c));
|
||||
return r;
|
||||
#endif
|
||||
}
|
||||
|
||||
/// \brief XOR and rotate
|
||||
/// \param a the first value
|
||||
/// \param b the second value
|
||||
/// \param c the third value
|
||||
/// \return two-way exclusive OR of the values, then rotated by c
|
||||
/// \details VXARQ() performs vxarq_u64(). VXARQ is provided as GCC inline assembly due
|
||||
/// to Clang and lack of support for the intrinsic.
|
||||
/// \details VXARQ requires ARMv8.2.
|
||||
/// \since Crypto++ 8.6
|
||||
inline uint64x2_t VXAR(uint64x2_t a, uint64x2_t b, const int c)
|
||||
{
|
||||
#if defined(CRYPTOPP_MSC_VERSION)
|
||||
return vxarq_u64(a, b, c);
|
||||
#else
|
||||
uint64x2_t r;
|
||||
__asm__ ("xar %0.2d, %1.2d, %2.2d, %3 \n\t"
|
||||
:"=w" (r) : "w" (a), "w" (b), "I" (c));
|
||||
return r;
|
||||
#endif
|
||||
}
|
||||
|
||||
/// \brief XOR and rotate
|
||||
/// \tparam C the rotate amount
|
||||
/// \param a the first value
|
||||
/// \param b the second value
|
||||
/// \return two-way exclusive OR of the values, then rotated by C
|
||||
/// \details VXARQ() performs vxarq_u64(). VXARQ is provided as GCC inline assembly due
|
||||
/// to Clang and lack of support for the intrinsic.
|
||||
/// \details VXARQ requires ARMv8.2.
|
||||
/// \since Crypto++ 8.6
|
||||
template <unsigned int C>
|
||||
inline uint64x2_t VXAR(uint64x2_t a, uint64x2_t b)
|
||||
{
|
||||
#if defined(CRYPTOPP_MSC_VERSION)
|
||||
return vxarq_u64(a, b, C);
|
||||
#else
|
||||
uint64x2_t r;
|
||||
__asm__ ("xar %0.2d, %1.2d, %2.2d, %3 \n\t"
|
||||
:"=w" (r) : "w" (a), "w" (b), "I" (C));
|
||||
return r;
|
||||
#endif
|
||||
}
|
||||
|
||||
/// \brief XOR and rotate
|
||||
/// \param a the first value
|
||||
/// \param b the second value
|
||||
/// \return two-way exclusive OR of the values, then rotated 1-bit
|
||||
/// \details VRAX1() performs vrax1q_u64(). VRAX1 is provided as GCC inline assembly due
|
||||
/// to Clang and lack of support for the intrinsic.
|
||||
/// \details VRAX1 requires ARMv8.2.
|
||||
/// \since Crypto++ 8.6
|
||||
inline uint64x2_t VRAX1(uint64x2_t a, uint64x2_t b)
|
||||
{
|
||||
#if defined(CRYPTOPP_MSC_VERSION)
|
||||
return vrax1q_u64(a, b);
|
||||
#else
|
||||
uint64x2_t r;
|
||||
__asm__ ("rax1 %0.2d, %1.2d, %2.2d \n\t"
|
||||
:"=w" (r) : "w" (a), "w" (b));
|
||||
return r;
|
||||
#endif
|
||||
}
|
||||
//@}
|
||||
#endif // CRYPTOPP_ARM_SHA3_AVAILABLE
|
||||
|
||||
#endif // CRYPTOPP_ARM_SIMD_H
|
||||
965
build-clang/vcpkg_installed/x64-windows/include/cryptopp/asn.h
Normal file
965
build-clang/vcpkg_installed/x64-windows/include/cryptopp/asn.h
Normal file
@ -0,0 +1,965 @@
|
||||
// asn.h - originally written and placed in the public domain by Wei Dai
|
||||
|
||||
/// \file asn.h
|
||||
/// \brief Classes and functions for working with ANS.1 objects
|
||||
|
||||
#ifndef CRYPTOPP_ASN_H
|
||||
#define CRYPTOPP_ASN_H
|
||||
|
||||
#include "cryptlib.h"
|
||||
#include "filters.h"
|
||||
#include "smartptr.h"
|
||||
#include "stdcpp.h"
|
||||
#include "queue.h"
|
||||
#include "misc.h"
|
||||
|
||||
#include <iosfwd>
|
||||
|
||||
// Issue 340
|
||||
#if CRYPTOPP_GCC_DIAGNOSTIC_AVAILABLE
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Wconversion"
|
||||
# pragma GCC diagnostic ignored "-Wsign-conversion"
|
||||
#endif
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
/// \brief ASN.1 types
|
||||
/// \note These tags are not complete
|
||||
enum ASNTag
|
||||
{
|
||||
/// \brief ASN.1 Boolean
|
||||
BOOLEAN = 0x01,
|
||||
/// \brief ASN.1 Integer
|
||||
INTEGER = 0x02,
|
||||
/// \brief ASN.1 Bit string
|
||||
BIT_STRING = 0x03,
|
||||
/// \brief ASN.1 Octet string
|
||||
OCTET_STRING = 0x04,
|
||||
/// \brief ASN.1 Null
|
||||
TAG_NULL = 0x05,
|
||||
/// \brief ASN.1 Object identifier
|
||||
OBJECT_IDENTIFIER = 0x06,
|
||||
/// \brief ASN.1 Object descriptor
|
||||
OBJECT_DESCRIPTOR = 0x07,
|
||||
/// \brief ASN.1 External reference
|
||||
EXTERNAL = 0x08,
|
||||
/// \brief ASN.1 Real integer
|
||||
REAL = 0x09,
|
||||
/// \brief ASN.1 Enumerated value
|
||||
ENUMERATED = 0x0a,
|
||||
/// \brief ASN.1 UTF-8 string
|
||||
UTF8_STRING = 0x0c,
|
||||
/// \brief ASN.1 Sequence
|
||||
SEQUENCE = 0x10,
|
||||
/// \brief ASN.1 Set
|
||||
SET = 0x11,
|
||||
/// \brief ASN.1 Numeric string
|
||||
NUMERIC_STRING = 0x12,
|
||||
/// \brief ASN.1 Printable string
|
||||
PRINTABLE_STRING = 0x13,
|
||||
/// \brief ASN.1 T61 string
|
||||
T61_STRING = 0x14,
|
||||
/// \brief ASN.1 Videotext string
|
||||
VIDEOTEXT_STRING = 0x15,
|
||||
/// \brief ASN.1 IA5 string
|
||||
IA5_STRING = 0x16,
|
||||
/// \brief ASN.1 UTC time
|
||||
UTC_TIME = 0x17,
|
||||
/// \brief ASN.1 Generalized time
|
||||
GENERALIZED_TIME = 0x18,
|
||||
/// \brief ASN.1 Graphic string
|
||||
GRAPHIC_STRING = 0x19,
|
||||
/// \brief ASN.1 Visible string
|
||||
VISIBLE_STRING = 0x1a,
|
||||
/// \brief ASN.1 General string
|
||||
GENERAL_STRING = 0x1b,
|
||||
/// \brief ASN.1 Universal string
|
||||
UNIVERSAL_STRING = 0x1c,
|
||||
/// \brief ASN.1 BMP string
|
||||
BMP_STRING = 0x1e
|
||||
};
|
||||
|
||||
/// \brief ASN.1 flags
|
||||
/// \note These flags are not complete
|
||||
enum ASNIdFlag
|
||||
{
|
||||
/// \brief ASN.1 Universal class
|
||||
UNIVERSAL = 0x00,
|
||||
// DATA = 0x01,
|
||||
// HEADER = 0x02,
|
||||
/// \brief ASN.1 Primitive flag
|
||||
PRIMITIVE = 0x00,
|
||||
/// \brief ASN.1 Constructed flag
|
||||
CONSTRUCTED = 0x20,
|
||||
/// \brief ASN.1 Application class
|
||||
APPLICATION = 0x40,
|
||||
/// \brief ASN.1 Context specific class
|
||||
CONTEXT_SPECIFIC = 0x80,
|
||||
/// \brief ASN.1 Private class
|
||||
PRIVATE = 0xc0
|
||||
};
|
||||
|
||||
/// \brief Raises a BERDecodeErr
|
||||
inline void BERDecodeError() {throw BERDecodeErr();}
|
||||
|
||||
/// \brief Exception thrown when an unknown object identifier is encountered
|
||||
class CRYPTOPP_DLL UnknownOID : public BERDecodeErr
|
||||
{
|
||||
public:
|
||||
/// \brief Construct an UnknownOID
|
||||
UnknownOID() : BERDecodeErr("BER decode error: unknown object identifier") {}
|
||||
/// \brief Construct an UnknownOID
|
||||
/// \param err error message to use for the exception
|
||||
UnknownOID(const char *err) : BERDecodeErr(err) {}
|
||||
};
|
||||
|
||||
/// \brief DER encode a length
|
||||
/// \param bt BufferedTransformation object for writing
|
||||
/// \param length the size to encode
|
||||
/// \return the number of octets used for the encoding
|
||||
CRYPTOPP_DLL size_t CRYPTOPP_API DERLengthEncode(BufferedTransformation &bt, lword length);
|
||||
|
||||
/// \brief BER decode a length
|
||||
/// \param bt BufferedTransformation object for reading
|
||||
/// \param length the decoded size
|
||||
/// \return true if the value was decoded
|
||||
/// \throw BERDecodeError if the value fails to decode or is too large for size_t
|
||||
/// \details BERLengthDecode() returns false if the encoding is indefinite length.
|
||||
CRYPTOPP_DLL bool CRYPTOPP_API BERLengthDecode(BufferedTransformation &bt, size_t &length);
|
||||
|
||||
/// \brief DER encode NULL
|
||||
/// \param bt BufferedTransformation object for writing
|
||||
CRYPTOPP_DLL void CRYPTOPP_API DEREncodeNull(BufferedTransformation &bt);
|
||||
|
||||
/// \brief BER decode NULL
|
||||
/// \param bt BufferedTransformation object for reading
|
||||
CRYPTOPP_DLL void CRYPTOPP_API BERDecodeNull(BufferedTransformation &bt);
|
||||
|
||||
/// \brief DER encode octet string
|
||||
/// \param bt BufferedTransformation object for writing
|
||||
/// \param str the string to encode
|
||||
/// \param strLen the length of the string
|
||||
/// \return the number of octets used for the encoding
|
||||
CRYPTOPP_DLL size_t CRYPTOPP_API DEREncodeOctetString(BufferedTransformation &bt, const byte *str, size_t strLen);
|
||||
|
||||
/// \brief DER encode octet string
|
||||
/// \param bt BufferedTransformation object for reading
|
||||
/// \param str the string to encode
|
||||
/// \return the number of octets used for the encoding
|
||||
CRYPTOPP_DLL size_t CRYPTOPP_API DEREncodeOctetString(BufferedTransformation &bt, const SecByteBlock &str);
|
||||
|
||||
/// \brief BER decode octet string
|
||||
/// \param bt BufferedTransformation object for reading
|
||||
/// \param str the decoded string
|
||||
/// \return the number of octets used for the encoding
|
||||
CRYPTOPP_DLL size_t CRYPTOPP_API BERDecodeOctetString(BufferedTransformation &bt, SecByteBlock &str);
|
||||
|
||||
/// \brief BER decode octet string
|
||||
/// \param bt BufferedTransformation object for reading
|
||||
/// \param str the decoded string
|
||||
/// \return the number of octets used for the encoding
|
||||
CRYPTOPP_DLL size_t CRYPTOPP_API BERDecodeOctetString(BufferedTransformation &bt, BufferedTransformation &str);
|
||||
|
||||
/// \brief DER encode text string
|
||||
/// \param bt BufferedTransformation object for writing
|
||||
/// \param str the string to encode
|
||||
/// \param strLen the length of the string, in bytes
|
||||
/// \param asnTag the ASN.1 identifier
|
||||
/// \return the number of octets used for the encoding
|
||||
/// \details DEREncodeTextString() can be used for UTF8_STRING, PRINTABLE_STRING, and IA5_STRING
|
||||
/// \since Crypto++ 8.3
|
||||
CRYPTOPP_DLL size_t CRYPTOPP_API DEREncodeTextString(BufferedTransformation &bt, const byte* str, size_t strLen, byte asnTag);
|
||||
|
||||
/// \brief DER encode text string
|
||||
/// \param bt BufferedTransformation object for writing
|
||||
/// \param str the string to encode
|
||||
/// \param asnTag the ASN.1 identifier
|
||||
/// \return the number of octets used for the encoding
|
||||
/// \details DEREncodeTextString() can be used for UTF8_STRING, PRINTABLE_STRING, and IA5_STRING
|
||||
/// \since Crypto++ 8.3
|
||||
CRYPTOPP_DLL size_t CRYPTOPP_API DEREncodeTextString(BufferedTransformation &bt, const SecByteBlock &str, byte asnTag);
|
||||
|
||||
/// \brief DER encode text string
|
||||
/// \param bt BufferedTransformation object for writing
|
||||
/// \param str the string to encode
|
||||
/// \param asnTag the ASN.1 identifier
|
||||
/// \return the number of octets used for the encoding
|
||||
/// \details DEREncodeTextString() can be used for UTF8_STRING, PRINTABLE_STRING, and IA5_STRING
|
||||
/// \since Crypto++ 6.0
|
||||
CRYPTOPP_DLL size_t CRYPTOPP_API DEREncodeTextString(BufferedTransformation &bt, const std::string &str, byte asnTag);
|
||||
|
||||
/// \brief BER decode text string
|
||||
/// \param bt BufferedTransformation object for reading
|
||||
/// \param str the string to decode
|
||||
/// \param asnTag the ASN.1 identifier
|
||||
/// \details BERDecodeTextString() can be used for UTF8_STRING, PRINTABLE_STRING, and IA5_STRING
|
||||
/// \since Crypto++ 8.3
|
||||
CRYPTOPP_DLL size_t CRYPTOPP_API BERDecodeTextString(BufferedTransformation &bt, SecByteBlock &str, byte asnTag);
|
||||
|
||||
/// \brief BER decode text string
|
||||
/// \param bt BufferedTransformation object for reading
|
||||
/// \param str the string to decode
|
||||
/// \param asnTag the ASN.1 identifier
|
||||
/// \details BERDecodeTextString() can be used for UTF8_STRING, PRINTABLE_STRING, and IA5_STRING
|
||||
/// \since Crypto++ 6.0
|
||||
CRYPTOPP_DLL size_t CRYPTOPP_API BERDecodeTextString(BufferedTransformation &bt, std::string &str, byte asnTag);
|
||||
|
||||
/// \brief DER encode date
|
||||
/// \param bt BufferedTransformation object for writing
|
||||
/// \param str the date to encode
|
||||
/// \param asnTag the ASN.1 identifier
|
||||
/// \return the number of octets used for the encoding
|
||||
/// \details BERDecodeDate() can be used for UTC_TIME and GENERALIZED_TIME
|
||||
/// \since Crypto++ 8.3
|
||||
CRYPTOPP_DLL size_t CRYPTOPP_API DEREncodeDate(BufferedTransformation &bt, const SecByteBlock &str, byte asnTag);
|
||||
|
||||
/// \brief BER decode date
|
||||
/// \param bt BufferedTransformation object for reading
|
||||
/// \param str the date to decode
|
||||
/// \param asnTag the ASN.1 identifier
|
||||
/// \details BERDecodeDate() can be used for UTC_TIME and GENERALIZED_TIME
|
||||
/// \since Crypto++ 8.3
|
||||
CRYPTOPP_DLL size_t CRYPTOPP_API BERDecodeDate(BufferedTransformation &bt, SecByteBlock &str, byte asnTag);
|
||||
|
||||
/// \brief DER encode bit string
|
||||
/// \param bt BufferedTransformation object for writing
|
||||
/// \param str the string to encode
|
||||
/// \param strLen the length of the string
|
||||
/// \param unusedBits the number of unused bits
|
||||
/// \return the number of octets used for the encoding
|
||||
/// \details The caller is responsible for shifting octets if unusedBits is
|
||||
/// not 0. For example, to DER encode a web server X.509 key usage, the 101b
|
||||
/// bit mask is often used (digitalSignature and keyEncipherment). In this
|
||||
/// case <tt>str</tt> is one octet with a value=0xa0 and unusedBits=5. The
|
||||
/// value 0xa0 is <tt>101b << 5</tt>.
|
||||
CRYPTOPP_DLL size_t CRYPTOPP_API DEREncodeBitString(BufferedTransformation &bt, const byte *str, size_t strLen, unsigned int unusedBits=0);
|
||||
|
||||
/// \brief DER decode bit string
|
||||
/// \param bt BufferedTransformation object for reading
|
||||
/// \param str the decoded string
|
||||
/// \param unusedBits the number of unused bits
|
||||
/// \details The caller is responsible for shifting octets if unusedBits is
|
||||
/// not 0. For example, to DER encode a web server X.509 key usage, the 101b
|
||||
/// bit mask is often used (digitalSignature and keyEncipherment). In this
|
||||
/// case <tt>str</tt> is one octet with a value=0xa0 and unusedBits=5. The
|
||||
/// value 0xa0 is <tt>101b << 5</tt>.
|
||||
CRYPTOPP_DLL size_t CRYPTOPP_API BERDecodeBitString(BufferedTransformation &bt, SecByteBlock &str, unsigned int &unusedBits);
|
||||
|
||||
/// \brief BER decode and DER re-encode
|
||||
/// \param bt BufferedTransformation object for writing
|
||||
/// \param dest BufferedTransformation object
|
||||
CRYPTOPP_DLL void CRYPTOPP_API DERReencode(BufferedTransformation &bt, BufferedTransformation &dest);
|
||||
|
||||
/// \brief BER decode size
|
||||
/// \param bt BufferedTransformation object for reading
|
||||
/// \return the length of the ASN.1 value, in bytes
|
||||
/// \details BERDecodePeekLength() determines the length of a value without
|
||||
/// consuming octets in the stream. The stream must use definite length encoding.
|
||||
/// If indefinite length encoding is used or an error occurs, then 0 is returned.
|
||||
/// \since Crypto++ 8.3
|
||||
CRYPTOPP_DLL size_t CRYPTOPP_API BERDecodePeekLength(const BufferedTransformation &bt);
|
||||
|
||||
/// \brief Object Identifier
|
||||
class CRYPTOPP_DLL OID
|
||||
{
|
||||
public:
|
||||
virtual ~OID() {}
|
||||
|
||||
/// \brief Construct an OID
|
||||
OID() {}
|
||||
|
||||
/// \brief Construct an OID
|
||||
/// \param v value to initialize the OID
|
||||
OID(word32 v) : m_values(1, v) {}
|
||||
|
||||
/// \brief Construct an OID
|
||||
/// \param bt BufferedTransformation object
|
||||
OID(BufferedTransformation &bt) {
|
||||
BERDecode(bt);
|
||||
}
|
||||
|
||||
/// \brief Append a value to an OID
|
||||
/// \param rhs the value to append
|
||||
inline OID & operator+=(word32 rhs) {
|
||||
m_values.push_back(rhs); return *this;
|
||||
}
|
||||
|
||||
/// \brief DER encode this OID
|
||||
/// \param bt BufferedTransformation object
|
||||
void DEREncode(BufferedTransformation &bt) const;
|
||||
|
||||
/// \brief BER decode an OID
|
||||
/// \param bt BufferedTransformation object
|
||||
void BERDecode(BufferedTransformation &bt);
|
||||
|
||||
/// \brief BER decode an OID
|
||||
/// \param bt BufferedTransformation object
|
||||
/// \throw BERDecodeErr() if decoded value doesn't match an expected OID
|
||||
/// \details BERDecodeAndCheck() can be used to parse an OID and verify it matches an expected.
|
||||
/// <pre>
|
||||
/// BERSequenceDecoder key(bt);
|
||||
/// ...
|
||||
/// BERSequenceDecoder algorithm(key);
|
||||
/// GetAlgorithmID().BERDecodeAndCheck(algorithm);
|
||||
/// </pre>
|
||||
void BERDecodeAndCheck(BufferedTransformation &bt) const;
|
||||
|
||||
/// \brief Determine if OID is empty
|
||||
/// \return true if OID has 0 elements, false otherwise
|
||||
/// \since Crypto++ 8.0
|
||||
bool Empty() const {
|
||||
return m_values.empty();
|
||||
}
|
||||
|
||||
/// \brief Retrieve OID value array
|
||||
/// \return OID value vector
|
||||
/// \since Crypto++ 8.0
|
||||
const std::vector<word32>& GetValues() const {
|
||||
return m_values;
|
||||
}
|
||||
|
||||
/// \brief Print an OID
|
||||
/// \param out ostream object
|
||||
/// \return ostream reference
|
||||
/// \details Print() writes the OID in a customary format, like
|
||||
/// 1.2.840.113549.1.1.11. The caller is reposnsible to convert the
|
||||
/// OID to a friendly name, like sha256WithRSAEncryption.
|
||||
/// \since Crypto++ 8.3
|
||||
std::ostream& Print(std::ostream& out) const;
|
||||
|
||||
protected:
|
||||
friend bool operator==(const OID &lhs, const OID &rhs);
|
||||
friend bool operator!=(const OID &lhs, const OID &rhs);
|
||||
friend bool operator<(const OID &lhs, const OID &rhs);
|
||||
friend bool operator<=(const OID &lhs, const OID &rhs);
|
||||
friend bool operator>=(const OID &lhs, const OID &rhs);
|
||||
|
||||
std::vector<word32> m_values;
|
||||
|
||||
private:
|
||||
static void EncodeValue(BufferedTransformation &bt, word32 v);
|
||||
static size_t DecodeValue(BufferedTransformation &bt, word32 &v);
|
||||
};
|
||||
|
||||
/// \brief ASN.1 encoded object filter
|
||||
class EncodedObjectFilter : public Filter
|
||||
{
|
||||
public:
|
||||
enum Flag {PUT_OBJECTS=1, PUT_MESSANGE_END_AFTER_EACH_OBJECT=2, PUT_MESSANGE_END_AFTER_ALL_OBJECTS=4, PUT_MESSANGE_SERIES_END_AFTER_ALL_OBJECTS=8};
|
||||
enum State {IDENTIFIER, LENGTH, BODY, TAIL, ALL_DONE} m_state;
|
||||
|
||||
virtual ~EncodedObjectFilter() {}
|
||||
|
||||
/// \brief Construct an EncodedObjectFilter
|
||||
/// \param attachment a BufferedTrasformation to attach to this object
|
||||
/// \param nObjects the number of objects
|
||||
/// \param flags bitwise OR of EncodedObjectFilter::Flag
|
||||
EncodedObjectFilter(BufferedTransformation *attachment = NULLPTR, unsigned int nObjects = 1, word32 flags = 0);
|
||||
|
||||
/// \brief Input a byte buffer for processing
|
||||
/// \param inString the byte buffer to process
|
||||
/// \param length the size of the string, in bytes
|
||||
void Put(const byte *inString, size_t length);
|
||||
|
||||
unsigned int GetNumberOfCompletedObjects() const {return m_nCurrentObject;}
|
||||
unsigned long GetPositionOfObject(unsigned int i) const {return m_positions[i];}
|
||||
|
||||
private:
|
||||
BufferedTransformation & CurrentTarget();
|
||||
|
||||
ByteQueue m_queue;
|
||||
std::vector<unsigned int> m_positions;
|
||||
lword m_lengthRemaining;
|
||||
word32 m_nObjects, m_nCurrentObject, m_level, m_flags;
|
||||
byte m_id;
|
||||
};
|
||||
|
||||
/// \brief BER General Decoder
|
||||
class CRYPTOPP_DLL BERGeneralDecoder : public Store
|
||||
{
|
||||
public:
|
||||
/// \brief Default ASN.1 tag
|
||||
enum {DefaultTag = SEQUENCE | EnumToInt(CONSTRUCTED)};
|
||||
|
||||
virtual ~BERGeneralDecoder();
|
||||
|
||||
/// \brief Construct an ASN.1 decoder
|
||||
/// \param inQueue input byte queue
|
||||
/// \details BERGeneralDecoder uses DefaultTag
|
||||
explicit BERGeneralDecoder(BufferedTransformation &inQueue);
|
||||
|
||||
/// \brief Construct an ASN.1 decoder
|
||||
/// \param inQueue input byte queue
|
||||
/// \param asnTag ASN.1 tag
|
||||
explicit BERGeneralDecoder(BufferedTransformation &inQueue, byte asnTag);
|
||||
|
||||
/// \brief Construct an ASN.1 decoder
|
||||
/// \param inQueue input byte queue
|
||||
/// \param asnTag ASN.1 tag
|
||||
explicit BERGeneralDecoder(BERGeneralDecoder &inQueue, byte asnTag);
|
||||
|
||||
/// \brief Determine length encoding
|
||||
/// \return true if the ASN.1 object is definite length encoded, false otherwise
|
||||
bool IsDefiniteLength() const {
|
||||
return m_definiteLength;
|
||||
}
|
||||
|
||||
/// \brief Determine remaining length
|
||||
/// \return number of octets that remain to be consumed
|
||||
/// \details RemainingLength() is only valid if IsDefiniteLength()
|
||||
/// returns true.
|
||||
lword RemainingLength() const {
|
||||
CRYPTOPP_ASSERT(m_definiteLength);
|
||||
return IsDefiniteLength() ? m_length : 0;
|
||||
}
|
||||
|
||||
/// \brief Determine end of stream
|
||||
/// \return true if all octets have been consumed, false otherwise
|
||||
bool EndReached() const;
|
||||
|
||||
/// \brief Determine next octet
|
||||
/// \return next octet in the stream
|
||||
/// \details PeekByte does not consume the octet.
|
||||
/// \throw BERDecodeError if there are no octets remaining
|
||||
byte PeekByte() const;
|
||||
|
||||
/// \brief Determine next octet
|
||||
/// \details CheckByte reads the next byte in the stream and verifies
|
||||
/// the octet matches b.
|
||||
/// \throw BERDecodeError if the next octet is not b
|
||||
void CheckByte(byte b);
|
||||
|
||||
/// \brief Transfer bytes to another BufferedTransformation
|
||||
/// \param target the destination BufferedTransformation
|
||||
/// \param transferBytes the number of bytes to transfer
|
||||
/// \param channel the channel on which the transfer should occur
|
||||
/// \param blocking specifies whether the object should block when
|
||||
/// processing input
|
||||
/// \return the number of bytes that remain in the transfer block
|
||||
/// (i.e., bytes not transferred)
|
||||
/// \details TransferTo2() removes bytes and moves
|
||||
/// them to the destination. Transfer begins at the index position
|
||||
/// in the current stream, and not from an absolute position in the
|
||||
/// stream.
|
||||
/// \details transferBytes is an \a IN and \a OUT parameter. When
|
||||
/// the call is made, transferBytes is the requested size of the
|
||||
/// transfer. When the call returns, transferBytes is the number
|
||||
/// of bytes that were transferred.
|
||||
size_t TransferTo2(BufferedTransformation &target, lword &transferBytes, const std::string &channel=DEFAULT_CHANNEL, bool blocking=true);
|
||||
|
||||
/// \brief Copy bytes to another BufferedTransformation
|
||||
/// \param target the destination BufferedTransformation
|
||||
/// \param begin the 0-based index of the first byte to copy in
|
||||
/// the stream
|
||||
/// \param end the 0-based index of the last byte to copy in
|
||||
/// the stream
|
||||
/// \param channel the channel on which the transfer should occur
|
||||
/// \param blocking specifies whether the object should block when
|
||||
/// processing input
|
||||
/// \return the number of bytes that remain in the copy block
|
||||
/// (i.e., bytes not copied)
|
||||
/// \details CopyRangeTo2 copies bytes to the
|
||||
/// destination. The bytes are not removed from this object. Copying
|
||||
/// begins at the index position in the current stream, and not from
|
||||
/// an absolute position in the stream.
|
||||
/// \details begin is an \a IN and \a OUT parameter. When the call is
|
||||
/// made, begin is the starting position of the copy. When the call
|
||||
/// returns, begin is the position of the first byte that was \a not
|
||||
/// copied (which may be different than end). begin can be used for
|
||||
/// subsequent calls to CopyRangeTo2().
|
||||
size_t CopyRangeTo2(BufferedTransformation &target, lword &begin, lword end=LWORD_MAX, const std::string &channel=DEFAULT_CHANNEL, bool blocking=true) const;
|
||||
|
||||
/// \brief Signals the end of messages to the object
|
||||
/// \details Call this to denote end of sequence
|
||||
void MessageEnd();
|
||||
|
||||
protected:
|
||||
BufferedTransformation &m_inQueue;
|
||||
lword m_length;
|
||||
bool m_finished, m_definiteLength;
|
||||
|
||||
private:
|
||||
void Init(byte asnTag);
|
||||
void StoreInitialize(const NameValuePairs ¶meters)
|
||||
{CRYPTOPP_UNUSED(parameters); CRYPTOPP_ASSERT(false);}
|
||||
lword ReduceLength(lword delta);
|
||||
};
|
||||
|
||||
/// \brief DER General Encoder
|
||||
class CRYPTOPP_DLL DERGeneralEncoder : public ByteQueue
|
||||
{
|
||||
public:
|
||||
/// \brief Default ASN.1 tag
|
||||
enum {DefaultTag = SEQUENCE | EnumToInt(CONSTRUCTED)};
|
||||
|
||||
virtual ~DERGeneralEncoder();
|
||||
|
||||
/// \brief Construct an ASN.1 encoder
|
||||
/// \param outQueue output byte queue
|
||||
/// \details DERGeneralEncoder uses DefaultTag
|
||||
explicit DERGeneralEncoder(BufferedTransformation &outQueue);
|
||||
|
||||
/// \brief Construct an ASN.1 encoder
|
||||
/// \param outQueue output byte queue
|
||||
/// \param asnTag ASN.1 tag
|
||||
explicit DERGeneralEncoder(BufferedTransformation &outQueue, byte asnTag);
|
||||
|
||||
/// \brief Construct an ASN.1 encoder
|
||||
/// \param outQueue output byte queue
|
||||
/// \param asnTag ASN.1 tag
|
||||
explicit DERGeneralEncoder(DERGeneralEncoder &outQueue, byte asnTag);
|
||||
|
||||
/// \brief Signals the end of messages to the object
|
||||
/// \details Call this to denote end of sequence
|
||||
void MessageEnd();
|
||||
|
||||
private:
|
||||
BufferedTransformation &m_outQueue;
|
||||
byte m_asnTag;
|
||||
bool m_finished;
|
||||
};
|
||||
|
||||
/// \brief BER Sequence Decoder
|
||||
class CRYPTOPP_DLL BERSequenceDecoder : public BERGeneralDecoder
|
||||
{
|
||||
public:
|
||||
/// \brief Default ASN.1 tag
|
||||
enum {DefaultTag = SEQUENCE | EnumToInt(CONSTRUCTED)};
|
||||
|
||||
/// \brief Construct an ASN.1 decoder
|
||||
/// \param inQueue input byte queue
|
||||
/// \details BERSequenceDecoder uses DefaultTag
|
||||
explicit BERSequenceDecoder(BufferedTransformation &inQueue)
|
||||
: BERGeneralDecoder(inQueue, DefaultTag) {}
|
||||
|
||||
/// \brief Construct an ASN.1 decoder
|
||||
/// \param inQueue input byte queue
|
||||
/// \param asnTag ASN.1 tag
|
||||
explicit BERSequenceDecoder(BufferedTransformation &inQueue, byte asnTag)
|
||||
: BERGeneralDecoder(inQueue, asnTag) {}
|
||||
|
||||
/// \brief Construct an ASN.1 decoder
|
||||
/// \param inQueue input byte queue
|
||||
/// \details BERSequenceDecoder uses DefaultTag
|
||||
explicit BERSequenceDecoder(BERSequenceDecoder &inQueue)
|
||||
: BERGeneralDecoder(inQueue, DefaultTag) {}
|
||||
|
||||
/// \brief Construct an ASN.1 decoder
|
||||
/// \param inQueue input byte queue
|
||||
/// \param asnTag ASN.1 tag
|
||||
explicit BERSequenceDecoder(BERSequenceDecoder &inQueue, byte asnTag)
|
||||
: BERGeneralDecoder(inQueue, asnTag) {}
|
||||
};
|
||||
|
||||
/// \brief DER Sequence Encoder
|
||||
class CRYPTOPP_DLL DERSequenceEncoder : public DERGeneralEncoder
|
||||
{
|
||||
public:
|
||||
/// \brief Default ASN.1 tag
|
||||
enum {DefaultTag = SEQUENCE | EnumToInt(CONSTRUCTED)};
|
||||
|
||||
/// \brief Construct an ASN.1 encoder
|
||||
/// \param outQueue output byte queue
|
||||
/// \details DERSequenceEncoder uses DefaultTag
|
||||
explicit DERSequenceEncoder(BufferedTransformation &outQueue)
|
||||
: DERGeneralEncoder(outQueue, DefaultTag) {}
|
||||
|
||||
/// \brief Construct an ASN.1 encoder
|
||||
/// \param outQueue output byte queue
|
||||
/// \param asnTag ASN.1 tag
|
||||
explicit DERSequenceEncoder(BufferedTransformation &outQueue, byte asnTag)
|
||||
: DERGeneralEncoder(outQueue, asnTag) {}
|
||||
|
||||
/// \brief Construct an ASN.1 encoder
|
||||
/// \param outQueue output byte queue
|
||||
/// \details DERSequenceEncoder uses DefaultTag
|
||||
explicit DERSequenceEncoder(DERSequenceEncoder &outQueue)
|
||||
: DERGeneralEncoder(outQueue, DefaultTag) {}
|
||||
|
||||
/// \brief Construct an ASN.1 encoder
|
||||
/// \param outQueue output byte queue
|
||||
/// \param asnTag ASN.1 tag
|
||||
explicit DERSequenceEncoder(DERSequenceEncoder &outQueue, byte asnTag)
|
||||
: DERGeneralEncoder(outQueue, asnTag) {}
|
||||
};
|
||||
|
||||
/// \brief BER Set Decoder
|
||||
class CRYPTOPP_DLL BERSetDecoder : public BERGeneralDecoder
|
||||
{
|
||||
public:
|
||||
/// \brief Default ASN.1 tag
|
||||
enum {DefaultTag = SET | EnumToInt(CONSTRUCTED)};
|
||||
|
||||
/// \brief Construct an ASN.1 decoder
|
||||
/// \param inQueue input byte queue
|
||||
/// \details BERSetDecoder uses DefaultTag
|
||||
explicit BERSetDecoder(BufferedTransformation &inQueue)
|
||||
: BERGeneralDecoder(inQueue, DefaultTag) {}
|
||||
|
||||
/// \brief Construct an ASN.1 decoder
|
||||
/// \param inQueue input byte queue
|
||||
/// \param asnTag ASN.1 tag
|
||||
explicit BERSetDecoder(BufferedTransformation &inQueue, byte asnTag)
|
||||
: BERGeneralDecoder(inQueue, asnTag) {}
|
||||
|
||||
/// \brief Construct an ASN.1 decoder
|
||||
/// \param inQueue input byte queue
|
||||
/// \details BERSetDecoder uses DefaultTag
|
||||
explicit BERSetDecoder(BERSetDecoder &inQueue)
|
||||
: BERGeneralDecoder(inQueue, DefaultTag) {}
|
||||
|
||||
/// \brief Construct an ASN.1 decoder
|
||||
/// \param inQueue input byte queue
|
||||
/// \param asnTag ASN.1 tag
|
||||
explicit BERSetDecoder(BERSetDecoder &inQueue, byte asnTag)
|
||||
: BERGeneralDecoder(inQueue, asnTag) {}
|
||||
};
|
||||
|
||||
/// \brief DER Set Encoder
|
||||
class CRYPTOPP_DLL DERSetEncoder : public DERGeneralEncoder
|
||||
{
|
||||
public:
|
||||
/// \brief Default ASN.1 tag
|
||||
enum {DefaultTag = SET | EnumToInt(CONSTRUCTED)};
|
||||
|
||||
/// \brief Construct an ASN.1 encoder
|
||||
/// \param outQueue output byte queue
|
||||
/// \details DERSetEncoder uses DefaultTag
|
||||
explicit DERSetEncoder(BufferedTransformation &outQueue)
|
||||
: DERGeneralEncoder(outQueue, DefaultTag) {}
|
||||
|
||||
/// \brief Construct an ASN.1 encoder
|
||||
/// \param outQueue output byte queue
|
||||
/// \param asnTag ASN.1 tag
|
||||
explicit DERSetEncoder(BufferedTransformation &outQueue, byte asnTag)
|
||||
: DERGeneralEncoder(outQueue, asnTag) {}
|
||||
|
||||
/// \brief Construct an ASN.1 encoder
|
||||
/// \param outQueue output byte queue
|
||||
/// \details DERSetEncoder uses DefaultTag
|
||||
explicit DERSetEncoder(DERSetEncoder &outQueue)
|
||||
: DERGeneralEncoder(outQueue, DefaultTag) {}
|
||||
|
||||
/// \brief Construct an ASN.1 encoder
|
||||
/// \param outQueue output byte queue
|
||||
/// \param asnTag ASN.1 tag
|
||||
explicit DERSetEncoder(DERSetEncoder &outQueue, byte asnTag)
|
||||
: DERGeneralEncoder(outQueue, asnTag) {}
|
||||
};
|
||||
|
||||
/// \brief Optional data encoder and decoder
|
||||
/// \tparam T class or type
|
||||
template <class T>
|
||||
class ASNOptional : public member_ptr<T>
|
||||
{
|
||||
public:
|
||||
/// \brief BER decode optional data
|
||||
/// \param seqDecoder sequence with the optional ASN.1 data
|
||||
/// \param tag ASN.1 tag to match as optional data
|
||||
/// \param mask the mask to apply when matching the tag
|
||||
/// \sa ASNTag and ASNIdFlag
|
||||
void BERDecode(BERSequenceDecoder &seqDecoder, byte tag, byte mask = ~CONSTRUCTED)
|
||||
{
|
||||
byte b;
|
||||
if (seqDecoder.Peek(b) && (b & mask) == tag)
|
||||
reset(new T(seqDecoder));
|
||||
}
|
||||
|
||||
/// \brief DER encode optional data
|
||||
/// \param out BufferedTransformation object
|
||||
void DEREncode(BufferedTransformation &out)
|
||||
{
|
||||
if (this->get() != NULLPTR)
|
||||
this->get()->DEREncode(out);
|
||||
}
|
||||
};
|
||||
|
||||
/// \brief Encode and decode ASN.1 objects with additional information
|
||||
/// \tparam BASE base class or type
|
||||
/// \details Encodes and decodes public keys, private keys and group
|
||||
/// parameters with OID identifying the algorithm or scheme.
|
||||
template <class BASE>
|
||||
class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE ASN1CryptoMaterial : public ASN1Object, public BASE
|
||||
{
|
||||
public:
|
||||
/// \brief DER encode ASN.1 object
|
||||
/// \param bt BufferedTransformation object
|
||||
/// \details Save() will write the OID associated with algorithm or scheme.
|
||||
/// In the case of public and private keys, this function writes the
|
||||
/// subjectPublicKeyInfo and privateKeyInfo parts.
|
||||
void Save(BufferedTransformation &bt) const
|
||||
{BEREncode(bt);}
|
||||
|
||||
/// \brief BER decode ASN.1 object
|
||||
/// \param bt BufferedTransformation object
|
||||
void Load(BufferedTransformation &bt)
|
||||
{BERDecode(bt);}
|
||||
};
|
||||
|
||||
/// \brief Encodes and decodes subjectPublicKeyInfo
|
||||
class CRYPTOPP_DLL X509PublicKey : public ASN1CryptoMaterial<PublicKey>
|
||||
{
|
||||
public:
|
||||
virtual ~X509PublicKey() {}
|
||||
|
||||
void BERDecode(BufferedTransformation &bt);
|
||||
void DEREncode(BufferedTransformation &bt) const;
|
||||
|
||||
/// \brief Retrieves the OID of the algorithm
|
||||
/// \return OID of the algorithm
|
||||
virtual OID GetAlgorithmID() const =0;
|
||||
|
||||
/// \brief Decode algorithm parameters
|
||||
/// \param bt BufferedTransformation object
|
||||
/// \sa BERDecodePublicKey, <A HREF="http://www.ietf.org/rfc/rfc2459.txt">RFC
|
||||
/// 2459, section 7.3.1</A>
|
||||
virtual bool BERDecodeAlgorithmParameters(BufferedTransformation &bt)
|
||||
{BERDecodeNull(bt); return false;}
|
||||
|
||||
/// \brief Encode algorithm parameters
|
||||
/// \param bt BufferedTransformation object
|
||||
/// \sa DEREncodePublicKey, <A HREF="http://www.ietf.org/rfc/rfc2459.txt">RFC
|
||||
/// 2459, section 7.3.1</A>
|
||||
virtual bool DEREncodeAlgorithmParameters(BufferedTransformation &bt) const
|
||||
{DEREncodeNull(bt); return false;}
|
||||
|
||||
/// \brief Decode subjectPublicKey part of subjectPublicKeyInfo
|
||||
/// \param bt BufferedTransformation object
|
||||
/// \param parametersPresent flag indicating if algorithm parameters are present
|
||||
/// \param size number of octets to read for the parameters, in bytes
|
||||
/// \details BERDecodePublicKey() the decodes subjectPublicKey part of
|
||||
/// subjectPublicKeyInfo, without the BIT STRING header.
|
||||
/// \details When <tt>parametersPresent = true</tt> then BERDecodePublicKey() calls
|
||||
/// BERDecodeAlgorithmParameters() to parse algorithm parameters.
|
||||
/// \sa BERDecodeAlgorithmParameters
|
||||
virtual void BERDecodePublicKey(BufferedTransformation &bt, bool parametersPresent, size_t size) =0;
|
||||
|
||||
/// \brief Encode subjectPublicKey part of subjectPublicKeyInfo
|
||||
/// \param bt BufferedTransformation object
|
||||
/// \details DEREncodePublicKey() encodes the subjectPublicKey part of
|
||||
/// subjectPublicKeyInfo, without the BIT STRING header.
|
||||
/// \sa DEREncodeAlgorithmParameters
|
||||
virtual void DEREncodePublicKey(BufferedTransformation &bt) const =0;
|
||||
};
|
||||
|
||||
/// \brief Encodes and Decodes privateKeyInfo
|
||||
class CRYPTOPP_DLL PKCS8PrivateKey : public ASN1CryptoMaterial<PrivateKey>
|
||||
{
|
||||
public:
|
||||
virtual ~PKCS8PrivateKey() {}
|
||||
|
||||
void BERDecode(BufferedTransformation &bt);
|
||||
void DEREncode(BufferedTransformation &bt) const;
|
||||
|
||||
/// \brief Retrieves the OID of the algorithm
|
||||
/// \return OID of the algorithm
|
||||
virtual OID GetAlgorithmID() const =0;
|
||||
|
||||
/// \brief Decode optional parameters
|
||||
/// \param bt BufferedTransformation object
|
||||
/// \sa BERDecodePrivateKey, <A HREF="http://www.ietf.org/rfc/rfc2459.txt">RFC
|
||||
/// 2459, section 7.3.1</A>
|
||||
virtual bool BERDecodeAlgorithmParameters(BufferedTransformation &bt)
|
||||
{BERDecodeNull(bt); return false;}
|
||||
|
||||
/// \brief Encode optional parameters
|
||||
/// \param bt BufferedTransformation object
|
||||
/// \sa DEREncodePrivateKey, <A HREF="http://www.ietf.org/rfc/rfc2459.txt">RFC
|
||||
/// 2459, section 7.3.1</A>
|
||||
virtual bool DEREncodeAlgorithmParameters(BufferedTransformation &bt) const
|
||||
{DEREncodeNull(bt); return false;}
|
||||
|
||||
/// \brief Decode privateKey part of privateKeyInfo
|
||||
/// \param bt BufferedTransformation object
|
||||
/// \param parametersPresent flag indicating if algorithm parameters are present
|
||||
/// \param size number of octets to read for the parameters, in bytes
|
||||
/// \details BERDecodePrivateKey() the decodes privateKey part of privateKeyInfo,
|
||||
/// without the OCTET STRING header.
|
||||
/// \details When <tt>parametersPresent = true</tt> then BERDecodePrivateKey() calls
|
||||
/// BERDecodeAlgorithmParameters() to parse algorithm parameters.
|
||||
/// \sa BERDecodeAlgorithmParameters
|
||||
virtual void BERDecodePrivateKey(BufferedTransformation &bt, bool parametersPresent, size_t size) =0;
|
||||
|
||||
/// \brief Encode privateKey part of privateKeyInfo
|
||||
/// \param bt BufferedTransformation object
|
||||
/// \details DEREncodePrivateKey() encodes the privateKey part of privateKeyInfo,
|
||||
/// without the OCTET STRING header.
|
||||
/// \sa DEREncodeAlgorithmParameters
|
||||
virtual void DEREncodePrivateKey(BufferedTransformation &bt) const =0;
|
||||
|
||||
/// \brief Decode optional attributes
|
||||
/// \param bt BufferedTransformation object
|
||||
/// \details BERDecodeOptionalAttributes() decodes optional attributes including
|
||||
/// context-specific tag.
|
||||
/// \sa BERDecodeAlgorithmParameters, DEREncodeOptionalAttributes
|
||||
/// \note default implementation stores attributes to be output using
|
||||
/// DEREncodeOptionalAttributes
|
||||
virtual void BERDecodeOptionalAttributes(BufferedTransformation &bt);
|
||||
|
||||
/// \brief Encode optional attributes
|
||||
/// \param bt BufferedTransformation object
|
||||
/// \details DEREncodeOptionalAttributes() encodes optional attributes including
|
||||
/// context-specific tag.
|
||||
/// \sa BERDecodeAlgorithmParameters
|
||||
virtual void DEREncodeOptionalAttributes(BufferedTransformation &bt) const;
|
||||
|
||||
protected:
|
||||
ByteQueue m_optionalAttributes;
|
||||
};
|
||||
|
||||
// ********************************************************
|
||||
|
||||
/// \brief DER Encode unsigned value
|
||||
/// \tparam T class or type
|
||||
/// \param out BufferedTransformation object
|
||||
/// \param w unsigned value to encode
|
||||
/// \param asnTag the ASN.1 identifier
|
||||
/// \details DEREncodeUnsigned() can be used with INTEGER, BOOLEAN, and ENUM
|
||||
template <class T>
|
||||
size_t DEREncodeUnsigned(BufferedTransformation &out, T w, byte asnTag = INTEGER)
|
||||
{
|
||||
byte buf[sizeof(w)+1];
|
||||
unsigned int bc;
|
||||
if (asnTag == BOOLEAN)
|
||||
{
|
||||
buf[sizeof(w)] = w ? 0xff : 0;
|
||||
bc = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
buf[0] = 0;
|
||||
for (unsigned int i=0; i<sizeof(w); i++)
|
||||
buf[i+1] = byte(w >> (sizeof(w)-1-i)*8);
|
||||
bc = sizeof(w);
|
||||
while (bc > 1 && buf[sizeof(w)+1-bc] == 0)
|
||||
--bc;
|
||||
if (buf[sizeof(w)+1-bc] & 0x80)
|
||||
++bc;
|
||||
}
|
||||
out.Put(asnTag);
|
||||
size_t lengthBytes = DERLengthEncode(out, bc);
|
||||
out.Put(buf+sizeof(w)+1-bc, bc);
|
||||
return 1+lengthBytes+bc;
|
||||
}
|
||||
|
||||
/// \brief BER Decode unsigned value
|
||||
/// \tparam T fundamental C++ type
|
||||
/// \param in BufferedTransformation object
|
||||
/// \param w the decoded value
|
||||
/// \param asnTag the ASN.1 identifier
|
||||
/// \param minValue the minimum expected value
|
||||
/// \param maxValue the maximum expected value
|
||||
/// \throw BERDecodeErr() if the value cannot be parsed or the decoded value is not within range.
|
||||
/// \details DEREncodeUnsigned() can be used with INTEGER, BOOLEAN, and ENUM
|
||||
template <class T>
|
||||
void BERDecodeUnsigned(BufferedTransformation &in, T &w, byte asnTag = INTEGER,
|
||||
T minValue = 0, T maxValue = T(0xffffffff))
|
||||
{
|
||||
byte b;
|
||||
if (!in.Get(b) || b != asnTag)
|
||||
BERDecodeError();
|
||||
|
||||
size_t bc;
|
||||
bool definite = BERLengthDecode(in, bc);
|
||||
if (!definite)
|
||||
BERDecodeError();
|
||||
if (bc > in.MaxRetrievable()) // Issue 346
|
||||
BERDecodeError();
|
||||
if (asnTag == BOOLEAN && bc != 1) // X.690, 8.2.1
|
||||
BERDecodeError();
|
||||
if ((asnTag == INTEGER || asnTag == ENUMERATED) && bc == 0) // X.690, 8.3.1 and 8.4
|
||||
BERDecodeError();
|
||||
|
||||
SecByteBlock buf(bc);
|
||||
|
||||
if (bc != in.Get(buf, bc))
|
||||
BERDecodeError();
|
||||
|
||||
// This consumes leading 0 octets. According to X.690, 8.3.2, it could be non-conforming behavior.
|
||||
// X.690, 8.3.2 says "the bits of the first octet and bit 8 of the second octet ... (a) shall
|
||||
// not all be ones and (b) shall not all be zeros ... These rules ensure that an integer value
|
||||
// is always encoded in the smallest possible number of octet".
|
||||
// We invented AER (Alternate Encoding Rules), which is more relaxed than BER, CER, and DER.
|
||||
const byte *ptr = buf;
|
||||
while (bc > sizeof(w) && *ptr == 0)
|
||||
{
|
||||
bc--;
|
||||
ptr++;
|
||||
}
|
||||
if (bc > sizeof(w))
|
||||
BERDecodeError();
|
||||
|
||||
w = 0;
|
||||
for (unsigned int i=0; i<bc; i++)
|
||||
w = (w << 8) | ptr[i];
|
||||
|
||||
if (w < minValue || w > maxValue)
|
||||
BERDecodeError();
|
||||
}
|
||||
|
||||
#ifdef CRYPTOPP_DOXYGEN_PROCESSING
|
||||
/// \brief Compare two OIDs for equality
|
||||
/// \param lhs the first OID
|
||||
/// \param rhs the second OID
|
||||
/// \return true if the OIDs are equal, false otherwise
|
||||
inline bool operator==(const OID &lhs, const OID &rhs);
|
||||
/// \brief Compare two OIDs for inequality
|
||||
/// \param lhs the first OID
|
||||
/// \param rhs the second OID
|
||||
/// \return true if the OIDs are not equal, false otherwise
|
||||
inline bool operator!=(const OID &lhs, const OID &rhs);
|
||||
/// \brief Compare two OIDs for ordering
|
||||
/// \param lhs the first OID
|
||||
/// \param rhs the second OID
|
||||
/// \return true if the first OID is less than the second OID, false otherwise
|
||||
/// \details operator<() calls std::lexicographical_compare() on each element in the array of values.
|
||||
inline bool operator<(const OID &lhs, const OID &rhs);
|
||||
/// \brief Compare two OIDs for ordering
|
||||
/// \param lhs the first OID
|
||||
/// \param rhs the second OID
|
||||
/// \return true if the first OID is less than or equal to the second OID, false otherwise
|
||||
/// \details operator<=() is implemented in terms of operator==() and operator<().
|
||||
/// \since Crypto++ 8.3
|
||||
inline bool operator<=(const OID &lhs, const OID &rhs);
|
||||
/// \brief Compare two OIDs for ordering
|
||||
/// \param lhs the first OID
|
||||
/// \param rhs the second OID
|
||||
/// \return true if the first OID is greater than or equal to the second OID, false otherwise
|
||||
/// \details operator>=() is implemented in terms of operator<().
|
||||
/// \since Crypto++ 8.3
|
||||
inline bool operator>=(const OID &lhs, const OID &rhs);
|
||||
/// \brief Append a value to an OID
|
||||
/// \param lhs the OID
|
||||
/// \param rhs the value to append
|
||||
inline OID operator+(const OID &lhs, unsigned long rhs);
|
||||
/// \brief Print a OID value
|
||||
/// \param out the output stream
|
||||
/// \param oid the OID
|
||||
inline std::ostream& operator<<(std::ostream& out, const OID &oid)
|
||||
{ return oid.Print(out); }
|
||||
#else
|
||||
inline bool operator==(const ::CryptoPP::OID &lhs, const ::CryptoPP::OID &rhs)
|
||||
{return lhs.m_values == rhs.m_values;}
|
||||
inline bool operator!=(const ::CryptoPP::OID &lhs, const ::CryptoPP::OID &rhs)
|
||||
{return lhs.m_values != rhs.m_values;}
|
||||
inline bool operator<(const ::CryptoPP::OID &lhs, const ::CryptoPP::OID &rhs)
|
||||
{return std::lexicographical_compare(lhs.m_values.begin(), lhs.m_values.end(), rhs.m_values.begin(), rhs.m_values.end());}
|
||||
inline bool operator<=(const ::CryptoPP::OID &lhs, const ::CryptoPP::OID &rhs)
|
||||
{return lhs<rhs || lhs==rhs;}
|
||||
inline bool operator>=(const ::CryptoPP::OID &lhs, const ::CryptoPP::OID &rhs)
|
||||
{return ! (lhs<rhs);}
|
||||
inline ::CryptoPP::OID operator+(const ::CryptoPP::OID &lhs, unsigned long rhs)
|
||||
{return ::CryptoPP::OID(lhs)+=rhs;}
|
||||
inline std::ostream& operator<<(std::ostream& out, const OID &oid)
|
||||
{ return oid.Print(out); }
|
||||
#endif
|
||||
|
||||
NAMESPACE_END
|
||||
|
||||
// Issue 340
|
||||
#if CRYPTOPP_GCC_DIAGNOSTIC_AVAILABLE
|
||||
# pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@ -0,0 +1,87 @@
|
||||
// authenc.h - originally written and placed in the public domain by Wei Dai
|
||||
|
||||
/// \file
|
||||
/// \brief Classes for authenticated encryption modes of operation
|
||||
/// \details Authenticated encryption (AE) schemes combine confidentiality and authenticity
|
||||
/// into a single mode of operation They gained traction in the early 2000's because manually
|
||||
/// combining them was error prone for the typical developer. Around that time, the desire to
|
||||
/// authenticate but not ecrypt additional data (AAD) was also identified. When both features
|
||||
/// are available from a scheme, the system is referred to as an AEAD scheme.
|
||||
/// \details Crypto++ provides four authenticated encryption modes of operation - CCM, EAX, GCM
|
||||
/// and OCB mode. All modes derive from AuthenticatedSymmetricCipherBase() and the
|
||||
/// motivation for the API, like calling AAD a "header", can be found in Bellare,
|
||||
/// Rogaway and Wagner's <A HREF="http://web.cs.ucdavis.edu/~rogaway/papers/eax.pdf">The EAX
|
||||
/// Mode of Operation</A>. The EAX paper suggested a basic API to help standardize AEAD
|
||||
/// schemes in software and promote adoption of the modes.
|
||||
/// \sa <A HREF="http://www.cryptopp.com/wiki/Authenticated_Encryption">Authenticated
|
||||
/// Encryption</A> on the Crypto++ wiki.
|
||||
/// \since Crypto++ 5.6.0
|
||||
|
||||
#ifndef CRYPTOPP_AUTHENC_H
|
||||
#define CRYPTOPP_AUTHENC_H
|
||||
|
||||
#include "cryptlib.h"
|
||||
#include "secblock.h"
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
/// \brief Base class for authenticated encryption modes of operation
|
||||
/// \details AuthenticatedSymmetricCipherBase() serves as a base implementation for one direction
|
||||
/// (encryption or decryption) of a stream cipher or block cipher mode with authentication.
|
||||
/// \details Crypto++ provides four authenticated encryption modes of operation - CCM, EAX, GCM
|
||||
/// and OCB mode. All modes derive from AuthenticatedSymmetricCipherBase() and the
|
||||
/// motivation for the API, like calling AAD a "header", can be found in Bellare,
|
||||
/// Rogaway and Wagner's <A HREF="http://web.cs.ucdavis.edu/~rogaway/papers/eax.pdf">The EAX
|
||||
/// Mode of Operation</A>. The EAX paper suggested a basic API to help standardize AEAD
|
||||
/// schemes in software and promote adoption of the modes.
|
||||
/// \sa <A HREF="http://www.cryptopp.com/wiki/Authenticated_Encryption">Authenticated
|
||||
/// Encryption</A> on the Crypto++ wiki.
|
||||
/// \since Crypto++ 5.6.0
|
||||
class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE AuthenticatedSymmetricCipherBase : public AuthenticatedSymmetricCipher
|
||||
{
|
||||
public:
|
||||
AuthenticatedSymmetricCipherBase() : m_totalHeaderLength(0), m_totalMessageLength(0),
|
||||
m_totalFooterLength(0), m_bufferedDataLength(0), m_state(State_Start) {}
|
||||
|
||||
// StreamTransformation interface
|
||||
bool IsRandomAccess() const {return false;}
|
||||
bool IsSelfInverting() const {return true;}
|
||||
|
||||
void SetKey(const byte *userKey, size_t keylength, const NameValuePairs ¶ms);
|
||||
void Restart() {if (m_state > State_KeySet) m_state = State_KeySet;}
|
||||
void Resynchronize(const byte *iv, int length=-1);
|
||||
void Update(const byte *input, size_t length);
|
||||
void ProcessData(byte *outString, const byte *inString, size_t length);
|
||||
void TruncatedFinal(byte *mac, size_t macSize);
|
||||
|
||||
protected:
|
||||
void UncheckedSetKey(const byte * key, unsigned int length,const CryptoPP::NameValuePairs ¶ms)
|
||||
{CRYPTOPP_UNUSED(key), CRYPTOPP_UNUSED(length), CRYPTOPP_UNUSED(params); CRYPTOPP_ASSERT(false);}
|
||||
|
||||
void AuthenticateData(const byte *data, size_t len);
|
||||
const SymmetricCipher & GetSymmetricCipher() const
|
||||
{return const_cast<AuthenticatedSymmetricCipherBase *>(this)->AccessSymmetricCipher();}
|
||||
|
||||
virtual SymmetricCipher & AccessSymmetricCipher() =0;
|
||||
virtual bool AuthenticationIsOnPlaintext() const =0;
|
||||
virtual unsigned int AuthenticationBlockSize() const =0;
|
||||
virtual void SetKeyWithoutResync(const byte *userKey, size_t keylength, const NameValuePairs ¶ms) =0;
|
||||
virtual void Resync(const byte *iv, size_t len) =0;
|
||||
virtual size_t AuthenticateBlocks(const byte *data, size_t len) =0;
|
||||
virtual void AuthenticateLastHeaderBlock() =0;
|
||||
virtual void AuthenticateLastConfidentialBlock() {}
|
||||
virtual void AuthenticateLastFooterBlock(byte *mac, size_t macSize) =0;
|
||||
|
||||
// State_AuthUntransformed: authentication is applied to plain text (Authenticate-then-Encrypt)
|
||||
// State_AuthTransformed: authentication is applied to cipher text (Encrypt-then-Authenticate)
|
||||
enum State {State_Start, State_KeySet, State_IVSet, State_AuthUntransformed, State_AuthTransformed, State_AuthFooter};
|
||||
|
||||
AlignedSecByteBlock m_buffer;
|
||||
lword m_totalHeaderLength, m_totalMessageLength, m_totalFooterLength;
|
||||
unsigned int m_bufferedDataLength;
|
||||
State m_state;
|
||||
};
|
||||
|
||||
NAMESPACE_END
|
||||
|
||||
#endif
|
||||
@ -0,0 +1,158 @@
|
||||
// base32.h - written and placed in the public domain by Frank Palazzolo, based on hex.cpp by Wei Dai
|
||||
// extended hex alphabet added by JW in November, 2017.
|
||||
|
||||
/// \file base32.h
|
||||
/// \brief Classes for Base32Encoder, Base32Decoder, Base32HexEncoder and Base32HexDecoder
|
||||
|
||||
#ifndef CRYPTOPP_BASE32_H
|
||||
#define CRYPTOPP_BASE32_H
|
||||
|
||||
#include "cryptlib.h"
|
||||
#include "basecode.h"
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
/// \brief Base32 encodes data using DUDE encoding
|
||||
/// \details Converts data to base32 using DUDE encoding. The default code is based on <A HREF="http://www.ietf.org/proceedings/51/I-D/draft-ietf-idn-dude-02.txt">Differential Unicode Domain Encoding (DUDE) (draft-ietf-idn-dude-02.txt)</A>.
|
||||
/// \sa Base32Encoder, Base32Decoder, Base32HexEncoder and Base32HexDecoder
|
||||
class Base32Encoder : public SimpleProxyFilter
|
||||
{
|
||||
public:
|
||||
/// \brief Construct a Base32Encoder
|
||||
/// \param attachment a BufferedTrasformation to attach to this object
|
||||
/// \param uppercase a flag indicating uppercase output
|
||||
/// \param groupSize the size of the grouping
|
||||
/// \param separator the separator to use between groups
|
||||
/// \param terminator the terminator appeand after processing
|
||||
/// \details Base32Encoder() constructs a default encoder. The constructor lacks fields for padding and
|
||||
/// line breaks. You must use IsolatedInitialize() to change the default padding character or suppress it.
|
||||
/// \sa Base32Encoder, Base32Decoder, Base32HexEncoder and Base32HexDecoder
|
||||
Base32Encoder(BufferedTransformation *attachment = NULLPTR, bool uppercase = true, int groupSize = 0, const std::string &separator = ":", const std::string &terminator = "")
|
||||
: SimpleProxyFilter(new BaseN_Encoder(new Grouper), attachment)
|
||||
{
|
||||
IsolatedInitialize(MakeParameters(Name::Uppercase(), uppercase)(Name::GroupSize(), groupSize)(Name::Separator(), ConstByteArrayParameter(separator))(Name::Terminator(), ConstByteArrayParameter(terminator)));
|
||||
}
|
||||
|
||||
/// \brief Initialize or reinitialize this object, without signal propagation
|
||||
/// \param parameters a set of NameValuePairs used to initialize this object
|
||||
/// \details IsolatedInitialize() is used to initialize or reinitialize an object using a variable
|
||||
/// number of arbitrarily typed arguments. IsolatedInitialize() does not call Initialize() on attached
|
||||
/// transformations. If initialization should be propagated, then use the Initialize() function.
|
||||
/// \details The following code modifies the padding and line break parameters for an encoder:
|
||||
/// <pre>
|
||||
/// Base32Encoder encoder;
|
||||
/// AlgorithmParameters params = MakeParameters(Pad(), false)(InsertLineBreaks(), false);
|
||||
/// encoder.IsolatedInitialize(params);</pre>
|
||||
/// \details You can change the encoding to <A HREF="http://tools.ietf.org/html/rfc4648#page-10">RFC 4648, Base
|
||||
/// 32 Encoding with Extended Hex Alphabet</A> by performing the following:
|
||||
/// <pre>
|
||||
/// Base32Encoder encoder;
|
||||
/// const byte ALPHABET[] = "0123456789ABCDEFGHIJKLMNOPQRSTUV";
|
||||
/// AlgorithmParameters params = MakeParameters(Name::EncodingLookupArray(),(const byte *)ALPHABET);
|
||||
/// encoder.IsolatedInitialize(params);</pre>
|
||||
/// \details If you change the encoding alphabet, then you will need to change the decoding alphabet \a and
|
||||
/// the decoder's lookup table.
|
||||
/// \sa Base32Encoder, Base32Decoder, Base32HexEncoder and Base32HexDecoder
|
||||
void IsolatedInitialize(const NameValuePairs ¶meters);
|
||||
};
|
||||
|
||||
/// \brief Base32 decodes data using DUDE encoding
|
||||
/// \details Converts data from base32 using DUDE encoding. The default code is based on <A HREF="http://www.ietf.org/proceedings/51/I-D/draft-ietf-idn-dude-02.txt">Differential Unicode Domain Encoding (DUDE) (draft-ietf-idn-dude-02.txt)</A>.
|
||||
/// \sa Base32Encoder, Base32Decoder, Base32HexEncoder and Base32HexDecoder
|
||||
class Base32Decoder : public BaseN_Decoder
|
||||
{
|
||||
public:
|
||||
/// \brief Construct a Base32Decoder
|
||||
/// \param attachment a BufferedTrasformation to attach to this object
|
||||
/// \sa IsolatedInitialize() for an example of modifying a Base32Decoder after construction.
|
||||
Base32Decoder(BufferedTransformation *attachment = NULLPTR)
|
||||
: BaseN_Decoder(GetDefaultDecodingLookupArray(), 5, attachment) {}
|
||||
|
||||
/// \brief Initialize or reinitialize this object, without signal propagation
|
||||
/// \param parameters a set of NameValuePairs used to initialize this object
|
||||
/// \details IsolatedInitialize() is used to initialize or reinitialize an object using a variable
|
||||
/// number of arbitrarily typed arguments. IsolatedInitialize() does not call Initialize() on attached
|
||||
/// transformations. If initialization should be propagated, then use the Initialize() function.
|
||||
/// \details You can change the encoding to <A HREF="http://tools.ietf.org/html/rfc4648#page-10">RFC 4648, Base
|
||||
/// 32 Encoding with Extended Hex Alphabet</A> by performing the following:
|
||||
/// <pre>
|
||||
/// int lookup[256];
|
||||
/// const byte ALPHABET[] = "0123456789ABCDEFGHIJKLMNOPQRSTUV";
|
||||
/// Base32Decoder::InitializeDecodingLookupArray(lookup, ALPHABET, 32, true /*insensitive*/);
|
||||
///
|
||||
/// Base32Decoder decoder;
|
||||
/// AlgorithmParameters params = MakeParameters(Name::DecodingLookupArray(),(const int *)lookup);
|
||||
/// decoder.IsolatedInitialize(params);</pre>
|
||||
/// \sa Base32Encoder, Base32Decoder, Base32HexEncoder and Base32HexDecoder
|
||||
void IsolatedInitialize(const NameValuePairs ¶meters);
|
||||
|
||||
private:
|
||||
/// \brief Provides the default decoding lookup table
|
||||
/// \return default decoding lookup table
|
||||
static const int * CRYPTOPP_API GetDefaultDecodingLookupArray();
|
||||
};
|
||||
|
||||
/// \brief Base32 encodes data using extended hex
|
||||
/// \details Converts data to base32 using extended hex alphabet. The alphabet is different than Base32Encoder.
|
||||
/// \sa Base32Encoder, Base32Decoder, Base32HexEncoder and Base32HexDecoder, <A HREF="http://tools.ietf.org/html/rfc4648#page-10">RFC 4648, Base 32 Encoding with Extended Hex Alphabet</A>.
|
||||
/// \since Crypto++ 6.0
|
||||
class Base32HexEncoder : public SimpleProxyFilter
|
||||
{
|
||||
public:
|
||||
/// \brief Construct a Base32HexEncoder
|
||||
/// \param attachment a BufferedTrasformation to attach to this object
|
||||
/// \param uppercase a flag indicating uppercase output
|
||||
/// \param groupSize the size of the grouping
|
||||
/// \param separator the separator to use between groups
|
||||
/// \param terminator the terminator appeand after processing
|
||||
/// \details Base32HexEncoder() constructs a default encoder. The constructor lacks fields for padding and
|
||||
/// line breaks. You must use IsolatedInitialize() to change the default padding character or suppress it.
|
||||
/// \sa Base32Encoder, Base32Decoder, Base32HexEncoder and Base32HexDecoder
|
||||
Base32HexEncoder(BufferedTransformation *attachment = NULLPTR, bool uppercase = true, int groupSize = 0, const std::string &separator = ":", const std::string &terminator = "")
|
||||
: SimpleProxyFilter(new BaseN_Encoder(new Grouper), attachment)
|
||||
{
|
||||
IsolatedInitialize(MakeParameters(Name::Uppercase(), uppercase)(Name::GroupSize(), groupSize)(Name::Separator(), ConstByteArrayParameter(separator))(Name::Terminator(), ConstByteArrayParameter(terminator)));
|
||||
}
|
||||
|
||||
/// \brief Initialize or reinitialize this object, without signal propagation
|
||||
/// \param parameters a set of NameValuePairs used to initialize this object
|
||||
/// \details IsolatedInitialize() is used to initialize or reinitialize an object using a variable
|
||||
/// number of arbitrarily typed arguments. IsolatedInitialize() does not call Initialize() on attached
|
||||
/// transformations. If initialization should be propagated, then use the Initialize() function.
|
||||
/// \details The following code modifies the padding and line break parameters for an encoder:
|
||||
/// <pre>
|
||||
/// Base32HexEncoder encoder;
|
||||
/// AlgorithmParameters params = MakeParameters(Pad(), false)(InsertLineBreaks(), false);
|
||||
/// encoder.IsolatedInitialize(params);</pre>
|
||||
void IsolatedInitialize(const NameValuePairs ¶meters);
|
||||
};
|
||||
|
||||
/// \brief Base32 decodes data using extended hex
|
||||
/// \details Converts data from base32 using extended hex alphabet. The alphabet is different than Base32Decoder.
|
||||
/// \sa Base32Encoder, Base32Decoder, Base32HexEncoder and Base32HexDecoder, <A HREF="http://tools.ietf.org/html/rfc4648#page-10">RFC 4648, Base 32 Encoding with Extended Hex Alphabet</A>.
|
||||
/// \since Crypto++ 6.0
|
||||
class Base32HexDecoder : public BaseN_Decoder
|
||||
{
|
||||
public:
|
||||
/// \brief Construct a Base32HexDecoder
|
||||
/// \param attachment a BufferedTrasformation to attach to this object
|
||||
/// \sa Base32Encoder, Base32Decoder, Base32HexEncoder and Base32HexDecoder
|
||||
Base32HexDecoder(BufferedTransformation *attachment = NULLPTR)
|
||||
: BaseN_Decoder(GetDefaultDecodingLookupArray(), 5, attachment) {}
|
||||
|
||||
/// \brief Initialize or reinitialize this object, without signal propagation
|
||||
/// \param parameters a set of NameValuePairs used to initialize this object
|
||||
/// \details IsolatedInitialize() is used to initialize or reinitialize an object using a variable
|
||||
/// number of arbitrarily typed arguments. IsolatedInitialize() does not call Initialize() on attached
|
||||
/// transformations. If initialization should be propagated, then use the Initialize() function.
|
||||
void IsolatedInitialize(const NameValuePairs ¶meters);
|
||||
|
||||
private:
|
||||
/// \brief Provides the default decoding lookup table
|
||||
/// \return default decoding lookup table
|
||||
static const int * CRYPTOPP_API GetDefaultDecodingLookupArray();
|
||||
};
|
||||
|
||||
NAMESPACE_END
|
||||
|
||||
#endif
|
||||
@ -0,0 +1,158 @@
|
||||
// base64.h - originally written and placed in the public domain by Wei Dai
|
||||
|
||||
/// \file base64.h
|
||||
/// \brief Classes for the Base64Encoder, Base64Decoder, Base64URLEncoder and Base64URLDecoder
|
||||
|
||||
#ifndef CRYPTOPP_BASE64_H
|
||||
#define CRYPTOPP_BASE64_H
|
||||
|
||||
#include "cryptlib.h"
|
||||
#include "basecode.h"
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
/// \brief Base64 encodes data using DUDE
|
||||
/// \details Base64 encodes data per <A HREF="http://tools.ietf.org/html/rfc4648#section-4">RFC 4648, Base 64 Encoding</A>.
|
||||
class Base64Encoder : public SimpleProxyFilter
|
||||
{
|
||||
public:
|
||||
/// \brief Construct a Base64Encoder
|
||||
/// \param attachment a BufferedTrasformation to attach to this object
|
||||
/// \param insertLineBreaks a BufferedTrasformation to attach to this object
|
||||
/// \param maxLineLength the length of a line if line breaks are used
|
||||
/// \details Base64Encoder constructs a default encoder. The constructor lacks a parameter for padding, and you must
|
||||
/// use IsolatedInitialize() to modify the Base64Encoder after construction.
|
||||
/// \sa IsolatedInitialize() for an example of modifying an encoder after construction.
|
||||
Base64Encoder(BufferedTransformation *attachment = NULLPTR, bool insertLineBreaks = true, int maxLineLength = 72)
|
||||
: SimpleProxyFilter(new BaseN_Encoder(new Grouper), attachment)
|
||||
{
|
||||
IsolatedInitialize(MakeParameters(Name::InsertLineBreaks(), insertLineBreaks)(Name::MaxLineLength(), maxLineLength));
|
||||
}
|
||||
|
||||
/// \brief Initialize or reinitialize this object, without signal propagation
|
||||
/// \param parameters a set of NameValuePairs used to initialize this object
|
||||
/// \details IsolatedInitialize() is used to initialize or reinitialize an object using a variable
|
||||
/// number of arbitrarily typed arguments. IsolatedInitialize() does not call Initialize() on attached
|
||||
/// transformations. If initialization should be propagated, then use the Initialize() function.
|
||||
/// \details The following code modifies the padding and line break parameters for an encoder:
|
||||
/// <pre>
|
||||
/// Base64Encoder encoder;
|
||||
/// AlgorithmParameters params = MakeParameters(Pad(), false)(InsertLineBreaks(), false);
|
||||
/// encoder.IsolatedInitialize(params);</pre>
|
||||
/// \details You can change the encoding to RFC 4648 web safe alphabet by performing the following:
|
||||
/// <pre>
|
||||
/// Base64Encoder encoder;
|
||||
/// const byte ALPHABET[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
|
||||
/// AlgorithmParameters params = MakeParameters(Name::EncodingLookupArray(),(const byte *)ALPHABET);
|
||||
/// encoder.IsolatedInitialize(params);</pre>
|
||||
/// \details If you change the encoding alphabet, then you will need to change the decoding alphabet \a and
|
||||
/// the decoder's lookup table.
|
||||
/// \sa Base64URLEncoder for an encoder that provides the web safe alphabet, and Base64Decoder::IsolatedInitialize()
|
||||
/// for an example of modifying a decoder's lookup table after construction.
|
||||
void IsolatedInitialize(const NameValuePairs ¶meters);
|
||||
};
|
||||
|
||||
/// \brief Base64 decodes data using DUDE
|
||||
/// \details Base64 encodes data per <A HREF="http://tools.ietf.org/html/rfc4648#section-4">RFC 4648, Base 64 Encoding</A>.
|
||||
class Base64Decoder : public BaseN_Decoder
|
||||
{
|
||||
public:
|
||||
/// \brief Construct a Base64Decoder
|
||||
/// \param attachment a BufferedTrasformation to attach to this object
|
||||
/// \sa IsolatedInitialize() for an example of modifying an encoder after construction.
|
||||
Base64Decoder(BufferedTransformation *attachment = NULLPTR)
|
||||
: BaseN_Decoder(GetDecodingLookupArray(), 6, attachment) {}
|
||||
|
||||
/// \brief Initialize or reinitialize this object, without signal propagation
|
||||
/// \param parameters a set of NameValuePairs used to initialize this object
|
||||
/// \details IsolatedInitialize() is used to initialize or reinitialize an object using a variable
|
||||
/// number of arbitrarily typed arguments. IsolatedInitialize() does not call Initialize() on attached
|
||||
/// transformations. If initialization should be propagated, then use the Initialize() function.
|
||||
/// \details The default decoding alpahbet is RFC 4868. You can change the to RFC 4868 web safe alphabet
|
||||
/// by performing the following:
|
||||
/// <pre>
|
||||
/// int lookup[256];
|
||||
/// const byte ALPHABET[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
|
||||
/// Base64Decoder::InitializeDecodingLookupArray(lookup, ALPHABET, 64, false);
|
||||
///
|
||||
/// Base64Decoder decoder;
|
||||
/// AlgorithmParameters params = MakeParameters(Name::DecodingLookupArray(),(const int *)lookup);
|
||||
/// decoder.IsolatedInitialize(params);</pre>
|
||||
/// \sa Base64URLDecoder for a decoder that provides the web safe alphabet, and Base64Encoder::IsolatedInitialize()
|
||||
/// for an example of modifying an encoder's alphabet after construction.
|
||||
void IsolatedInitialize(const NameValuePairs ¶meters);
|
||||
|
||||
private:
|
||||
/// \brief Provides the default decoding lookup table
|
||||
/// \return default decoding lookup table
|
||||
static const int * CRYPTOPP_API GetDecodingLookupArray();
|
||||
};
|
||||
|
||||
/// \brief Base64 encodes data using a web safe alphabet
|
||||
/// \details Base64 encodes data per <A HREF="http://tools.ietf.org/html/rfc4648#section-5">RFC 4648, Base 64 Encoding
|
||||
/// with URL and Filename Safe Alphabet</A>.
|
||||
class Base64URLEncoder : public SimpleProxyFilter
|
||||
{
|
||||
public:
|
||||
/// \brief Construct a Base64URLEncoder
|
||||
/// \param attachment a BufferedTrasformation to attach to this object
|
||||
/// \param insertLineBreaks a BufferedTrasformation to attach to this object
|
||||
/// \param maxLineLength the length of a line if line breaks are used
|
||||
/// \details Base64URLEncoder() constructs a default encoder using a web safe alphabet. The constructor ignores
|
||||
/// insertLineBreaks and maxLineLength because the web and URL safe specifications don't use them. They are
|
||||
/// present in the constructor for API compatibility with Base64Encoder so it is a drop-in replacement. The
|
||||
/// constructor also disables padding on the encoder for the same reason.
|
||||
/// \details If you need line breaks or padding, then you must use IsolatedInitialize() to set them
|
||||
/// after constructing a Base64URLEncoder.
|
||||
/// \sa Base64Encoder for an encoder that provides a classic alphabet, and Base64URLEncoder::IsolatedInitialize
|
||||
/// for an example of modifying an encoder after construction.
|
||||
Base64URLEncoder(BufferedTransformation *attachment = NULLPTR, bool insertLineBreaks = false, int maxLineLength = -1)
|
||||
: SimpleProxyFilter(new BaseN_Encoder(new Grouper), attachment)
|
||||
{
|
||||
CRYPTOPP_UNUSED(insertLineBreaks), CRYPTOPP_UNUSED(maxLineLength);
|
||||
IsolatedInitialize(MakeParameters(Name::InsertLineBreaks(), false)(Name::MaxLineLength(), -1)(Name::Pad(),false));
|
||||
}
|
||||
|
||||
/// \details IsolatedInitialize() is used to initialize or reinitialize an object using a variable
|
||||
/// number of arbitrarily typed arguments. IsolatedInitialize() does not call Initialize() on attached
|
||||
/// transformations. If initialization should be propagated, then use the Initialize() function.
|
||||
/// \details The following code modifies the padding and line break parameters for an encoder:
|
||||
/// <pre>
|
||||
/// Base64URLEncoder encoder;
|
||||
/// AlgorithmParameters params = MakeParameters(Name::Pad(), true)(Name::InsertLineBreaks(), true);
|
||||
/// encoder.IsolatedInitialize(params);</pre>
|
||||
/// \sa Base64Encoder for an encoder that provides a classic alphabet.
|
||||
void IsolatedInitialize(const NameValuePairs ¶meters);
|
||||
};
|
||||
|
||||
/// \brief Base64 decodes data using a web safe alphabet
|
||||
/// \details Base64 encodes data per <A HREF="http://tools.ietf.org/html/rfc4648#section-5">RFC 4648, Base 64 Encoding
|
||||
/// with URL and Filename Safe Alphabet</A>.
|
||||
class Base64URLDecoder : public BaseN_Decoder
|
||||
{
|
||||
public:
|
||||
/// \brief Construct a Base64URLDecoder
|
||||
/// \param attachment a BufferedTrasformation to attach to this object
|
||||
/// \details Base64URLDecoder() constructs a default decoder using a web safe alphabet.
|
||||
/// \sa Base64Decoder for a decoder that provides a classic alphabet.
|
||||
Base64URLDecoder(BufferedTransformation *attachment = NULLPTR)
|
||||
: BaseN_Decoder(GetDecodingLookupArray(), 6, attachment) {}
|
||||
|
||||
/// \brief Initialize or reinitialize this object, without signal propagation
|
||||
/// \param parameters a set of NameValuePairs used to initialize this object
|
||||
/// \details IsolatedInitialize() is used to initialize or reinitialize an object using a variable
|
||||
/// number of arbitrarily typed arguments. IsolatedInitialize() does not call Initialize() on
|
||||
/// attached transformations. If initialization should be propagated, then use the Initialize() function.
|
||||
/// \sa Base64Decoder for a decoder that provides a classic alphabet, and Base64URLEncoder::IsolatedInitialize
|
||||
/// for an example of modifying an encoder after construction.
|
||||
void IsolatedInitialize(const NameValuePairs ¶meters);
|
||||
|
||||
private:
|
||||
/// \brief Provides the default decoding lookup table
|
||||
/// \return default decoding lookup table
|
||||
static const int * CRYPTOPP_API GetDecodingLookupArray();
|
||||
};
|
||||
|
||||
NAMESPACE_END
|
||||
|
||||
#endif
|
||||
@ -0,0 +1,146 @@
|
||||
// basecode.h - originally written and placed in the public domain by Wei Dai
|
||||
|
||||
/// \file
|
||||
/// \brief Base classes for working with encoders and decoders.
|
||||
|
||||
#ifndef CRYPTOPP_BASECODE_H
|
||||
#define CRYPTOPP_BASECODE_H
|
||||
|
||||
#include "cryptlib.h"
|
||||
#include "filters.h"
|
||||
#include "algparam.h"
|
||||
#include "argnames.h"
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
/// \brief Encoder for bases that are a power of 2
|
||||
class CRYPTOPP_DLL BaseN_Encoder : public Unflushable<Filter>
|
||||
{
|
||||
public:
|
||||
/// \brief Construct a BaseN_Encoder
|
||||
/// \param attachment a BufferedTransformation to attach to this object
|
||||
BaseN_Encoder(BufferedTransformation *attachment=NULLPTR)
|
||||
: m_alphabet(NULLPTR), m_padding(0), m_bitsPerChar(0)
|
||||
, m_outputBlockSize(0), m_bytePos(0), m_bitPos(0)
|
||||
{Detach(attachment);}
|
||||
|
||||
/// \brief Construct a BaseN_Encoder
|
||||
/// \param alphabet table of ASCII characters to use as the alphabet
|
||||
/// \param log2base the log<sub>2</sub>base
|
||||
/// \param attachment a BufferedTransformation to attach to this object
|
||||
/// \param padding the character to use as padding
|
||||
/// \pre log2base must be between 1 and 7 inclusive
|
||||
/// \throw InvalidArgument if log2base is not between 1 and 7
|
||||
BaseN_Encoder(const byte *alphabet, int log2base, BufferedTransformation *attachment=NULLPTR, int padding=-1)
|
||||
: m_alphabet(NULLPTR), m_padding(0), m_bitsPerChar(0)
|
||||
, m_outputBlockSize(0), m_bytePos(0), m_bitPos(0)
|
||||
{
|
||||
Detach(attachment);
|
||||
BaseN_Encoder::IsolatedInitialize(
|
||||
MakeParameters
|
||||
(Name::EncodingLookupArray(), alphabet)
|
||||
(Name::Log2Base(), log2base)
|
||||
(Name::Pad(), padding != -1)
|
||||
(Name::PaddingByte(), byte(padding)));
|
||||
}
|
||||
|
||||
void IsolatedInitialize(const NameValuePairs ¶meters);
|
||||
size_t Put2(const byte *begin, size_t length, int messageEnd, bool blocking);
|
||||
|
||||
private:
|
||||
const byte *m_alphabet;
|
||||
int m_padding, m_bitsPerChar, m_outputBlockSize;
|
||||
int m_bytePos, m_bitPos;
|
||||
SecByteBlock m_outBuf;
|
||||
};
|
||||
|
||||
/// \brief Decoder for bases that are a power of 2
|
||||
class CRYPTOPP_DLL BaseN_Decoder : public Unflushable<Filter>
|
||||
{
|
||||
public:
|
||||
/// \brief Construct a BaseN_Decoder
|
||||
/// \param attachment a BufferedTransformation to attach to this object
|
||||
/// \details padding is set to -1, which means use default padding. If not
|
||||
/// required, then the value must be set via IsolatedInitialize().
|
||||
BaseN_Decoder(BufferedTransformation *attachment=NULLPTR)
|
||||
: m_lookup(NULLPTR), m_bitsPerChar(0)
|
||||
, m_outputBlockSize(0), m_bytePos(0), m_bitPos(0)
|
||||
{Detach(attachment);}
|
||||
|
||||
/// \brief Construct a BaseN_Decoder
|
||||
/// \param lookup table of values
|
||||
/// \param log2base the log<sub>2</sub>base
|
||||
/// \param attachment a BufferedTransformation to attach to this object
|
||||
/// \details log2base is the exponent (like 5 in 2<sup>5</sup>), and not
|
||||
/// the number of elements (like 32).
|
||||
/// \details padding is set to -1, which means use default padding. If not
|
||||
/// required, then the value must be set via IsolatedInitialize().
|
||||
BaseN_Decoder(const int *lookup, int log2base, BufferedTransformation *attachment=NULLPTR)
|
||||
: m_lookup(NULLPTR), m_bitsPerChar(0)
|
||||
, m_outputBlockSize(0), m_bytePos(0), m_bitPos(0)
|
||||
{
|
||||
Detach(attachment);
|
||||
BaseN_Decoder::IsolatedInitialize(
|
||||
MakeParameters
|
||||
(Name::DecodingLookupArray(), lookup)
|
||||
(Name::Log2Base(), log2base));
|
||||
}
|
||||
|
||||
void IsolatedInitialize(const NameValuePairs ¶meters);
|
||||
size_t Put2(const byte *begin, size_t length, int messageEnd, bool blocking);
|
||||
|
||||
/// \brief Initializes BaseN lookup array
|
||||
/// \param lookup table of values
|
||||
/// \param alphabet table of ASCII characters
|
||||
/// \param base the base for the encoder
|
||||
/// \param caseInsensitive flag indicating whether the alphabet is case sensitivie
|
||||
/// \pre COUNTOF(lookup) == 256
|
||||
/// \pre COUNTOF(alphabet) == base
|
||||
/// \details Internally, the function sets the first 256 elements in the lookup table to
|
||||
/// their value from the alphabet array or -1. base is the number of element (like 32),
|
||||
/// and not an exponent (like 5 in 2<sup>5</sup>)
|
||||
static void CRYPTOPP_API InitializeDecodingLookupArray(int *lookup, const byte *alphabet, unsigned int base, bool caseInsensitive);
|
||||
|
||||
private:
|
||||
const int *m_lookup;
|
||||
int m_bitsPerChar, m_outputBlockSize;
|
||||
int m_bytePos, m_bitPos;
|
||||
SecByteBlock m_outBuf;
|
||||
};
|
||||
|
||||
/// \brief Filter that breaks input stream into groups of fixed size
|
||||
class CRYPTOPP_DLL Grouper : public Bufferless<Filter>
|
||||
{
|
||||
public:
|
||||
/// \brief Construct a Grouper
|
||||
/// \param attachment a BufferedTransformation to attach to this object
|
||||
Grouper(BufferedTransformation *attachment=NULLPTR)
|
||||
: m_groupSize(0), m_counter(0) {Detach(attachment);}
|
||||
|
||||
/// \brief Construct a Grouper
|
||||
/// \param groupSize the size of the grouping
|
||||
/// \param separator the separator to use between groups
|
||||
/// \param terminator the terminator appeand after processing
|
||||
/// \param attachment a BufferedTransformation to attach to this object
|
||||
Grouper(int groupSize, const std::string &separator, const std::string &terminator, BufferedTransformation *attachment=NULLPTR)
|
||||
: m_groupSize(0), m_counter(0)
|
||||
{
|
||||
Detach(attachment);
|
||||
Grouper::IsolatedInitialize(
|
||||
MakeParameters
|
||||
(Name::GroupSize(), groupSize)
|
||||
(Name::Separator(), ConstByteArrayParameter(separator))
|
||||
(Name::Terminator(), ConstByteArrayParameter(terminator)));
|
||||
}
|
||||
|
||||
void IsolatedInitialize(const NameValuePairs ¶meters);
|
||||
size_t Put2(const byte *begin, size_t length, int messageEnd, bool blocking);
|
||||
|
||||
private:
|
||||
SecByteBlock m_separator, m_terminator;
|
||||
size_t m_groupSize, m_counter;
|
||||
};
|
||||
|
||||
NAMESPACE_END
|
||||
|
||||
#endif
|
||||
@ -0,0 +1,444 @@
|
||||
// blake2.h - written and placed in the public domain by Jeffrey Walton
|
||||
// and Zooko Wilcox-O'Hearn. Based on Aumasson, Neves,
|
||||
// Wilcox-O'Hearn and Winnerlein's reference BLAKE2
|
||||
// implementation at http://github.com/BLAKE2/BLAKE2.
|
||||
|
||||
/// \file blake2.h
|
||||
/// \brief Classes for BLAKE2b and BLAKE2s message digests and keyed message digests
|
||||
/// \details This implementation follows Aumasson, Neves, Wilcox-O'Hearn and Winnerlein's
|
||||
/// <A HREF="http://blake2.net/blake2.pdf">BLAKE2: simpler, smaller, fast as MD5</A> (2013.01.29).
|
||||
/// Static algorithm name return either "BLAKE2b" or "BLAKE2s". An object algorithm name follows
|
||||
/// the naming described in <A HREF="http://tools.ietf.org/html/rfc7693#section-4">RFC 7693, The
|
||||
/// BLAKE2 Cryptographic Hash and Message Authentication Code (MAC)</A>.
|
||||
/// \since C++ since Crypto++ 5.6.4, SSE since Crypto++ 5.6.4, NEON since Crypto++ 6.0,
|
||||
/// Power8 since Crypto++ 8.0
|
||||
|
||||
#ifndef CRYPTOPP_BLAKE2_H
|
||||
#define CRYPTOPP_BLAKE2_H
|
||||
|
||||
#include "cryptlib.h"
|
||||
#include "secblock.h"
|
||||
#include "seckey.h"
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
/// \brief BLAKE2s hash information
|
||||
/// \since Crypto++ 5.6.4
|
||||
struct BLAKE2s_Info : public VariableKeyLength<32,0,32,1,SimpleKeyingInterface::NOT_RESYNCHRONIZABLE>
|
||||
{
|
||||
typedef VariableKeyLength<32,0,32,1,SimpleKeyingInterface::NOT_RESYNCHRONIZABLE> KeyBase;
|
||||
CRYPTOPP_CONSTANT(MIN_KEYLENGTH = KeyBase::MIN_KEYLENGTH);
|
||||
CRYPTOPP_CONSTANT(MAX_KEYLENGTH = KeyBase::MAX_KEYLENGTH);
|
||||
CRYPTOPP_CONSTANT(DEFAULT_KEYLENGTH = KeyBase::DEFAULT_KEYLENGTH);
|
||||
|
||||
CRYPTOPP_CONSTANT(BLOCKSIZE = 64);
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE = 32);
|
||||
CRYPTOPP_CONSTANT(SALTSIZE = 8);
|
||||
CRYPTOPP_CONSTANT(PERSONALIZATIONSIZE = 8);
|
||||
|
||||
CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "BLAKE2s";}
|
||||
};
|
||||
|
||||
/// \brief BLAKE2b hash information
|
||||
/// \since Crypto++ 5.6.4
|
||||
struct BLAKE2b_Info : public VariableKeyLength<64,0,64,1,SimpleKeyingInterface::NOT_RESYNCHRONIZABLE>
|
||||
{
|
||||
typedef VariableKeyLength<64,0,64,1,SimpleKeyingInterface::NOT_RESYNCHRONIZABLE> KeyBase;
|
||||
CRYPTOPP_CONSTANT(MIN_KEYLENGTH = KeyBase::MIN_KEYLENGTH);
|
||||
CRYPTOPP_CONSTANT(MAX_KEYLENGTH = KeyBase::MAX_KEYLENGTH);
|
||||
CRYPTOPP_CONSTANT(DEFAULT_KEYLENGTH = KeyBase::DEFAULT_KEYLENGTH);
|
||||
|
||||
CRYPTOPP_CONSTANT(BLOCKSIZE = 128);
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE = 64);
|
||||
CRYPTOPP_CONSTANT(SALTSIZE = 16);
|
||||
CRYPTOPP_CONSTANT(PERSONALIZATIONSIZE = 16);
|
||||
|
||||
CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "BLAKE2b";}
|
||||
};
|
||||
|
||||
/// \brief BLAKE2s parameter block
|
||||
struct CRYPTOPP_NO_VTABLE BLAKE2s_ParameterBlock
|
||||
{
|
||||
CRYPTOPP_CONSTANT(SALTSIZE = BLAKE2s_Info::SALTSIZE);
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE = BLAKE2s_Info::DIGESTSIZE);
|
||||
CRYPTOPP_CONSTANT(PERSONALIZATIONSIZE = BLAKE2s_Info::PERSONALIZATIONSIZE);
|
||||
|
||||
BLAKE2s_ParameterBlock()
|
||||
{
|
||||
Reset();
|
||||
}
|
||||
|
||||
BLAKE2s_ParameterBlock(size_t digestSize)
|
||||
{
|
||||
Reset(digestSize);
|
||||
}
|
||||
|
||||
BLAKE2s_ParameterBlock(size_t digestSize, size_t keyLength, const byte* salt, size_t saltLength,
|
||||
const byte* personalization, size_t personalizationLength);
|
||||
|
||||
void Reset(size_t digestLength=DIGESTSIZE, size_t keyLength=0);
|
||||
|
||||
byte* data() {
|
||||
return m_data.data();
|
||||
}
|
||||
|
||||
const byte* data() const {
|
||||
return m_data.data();
|
||||
}
|
||||
|
||||
size_t size() const {
|
||||
return m_data.size();
|
||||
}
|
||||
|
||||
byte* salt() {
|
||||
return m_data + SaltOff;
|
||||
}
|
||||
|
||||
byte* personalization() {
|
||||
return m_data + PersonalizationOff;
|
||||
}
|
||||
|
||||
// Offsets into the byte array
|
||||
enum {
|
||||
DigestOff = 0, KeyOff = 1, FanoutOff = 2, DepthOff = 3, LeafOff = 4, NodeOff = 8,
|
||||
NodeDepthOff = 14, InnerOff = 15, SaltOff = 16, PersonalizationOff = 24
|
||||
};
|
||||
|
||||
FixedSizeAlignedSecBlock<byte, 32, true> m_data;
|
||||
};
|
||||
|
||||
/// \brief BLAKE2b parameter block
|
||||
struct CRYPTOPP_NO_VTABLE BLAKE2b_ParameterBlock
|
||||
{
|
||||
CRYPTOPP_CONSTANT(SALTSIZE = BLAKE2b_Info::SALTSIZE);
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE = BLAKE2b_Info::DIGESTSIZE);
|
||||
CRYPTOPP_CONSTANT(PERSONALIZATIONSIZE = BLAKE2b_Info::PERSONALIZATIONSIZE);
|
||||
|
||||
BLAKE2b_ParameterBlock()
|
||||
{
|
||||
Reset();
|
||||
}
|
||||
|
||||
BLAKE2b_ParameterBlock(size_t digestSize)
|
||||
{
|
||||
Reset(digestSize);
|
||||
}
|
||||
|
||||
BLAKE2b_ParameterBlock(size_t digestSize, size_t keyLength, const byte* salt, size_t saltLength,
|
||||
const byte* personalization, size_t personalizationLength);
|
||||
|
||||
void Reset(size_t digestLength=DIGESTSIZE, size_t keyLength=0);
|
||||
|
||||
byte* data() {
|
||||
return m_data.data();
|
||||
}
|
||||
|
||||
const byte* data() const {
|
||||
return m_data.data();
|
||||
}
|
||||
|
||||
size_t size() const {
|
||||
return m_data.size();
|
||||
}
|
||||
|
||||
byte* salt() {
|
||||
return m_data + SaltOff;
|
||||
}
|
||||
|
||||
byte* personalization() {
|
||||
return m_data + PersonalizationOff;
|
||||
}
|
||||
|
||||
// Offsets into the byte array
|
||||
enum {
|
||||
DigestOff = 0, KeyOff = 1, FanoutOff = 2, DepthOff = 3, LeafOff = 4, NodeOff = 8,
|
||||
NodeDepthOff = 16, InnerOff = 17, RfuOff = 18, SaltOff = 32, PersonalizationOff = 48
|
||||
};
|
||||
|
||||
FixedSizeAlignedSecBlock<byte, 64, true> m_data;
|
||||
};
|
||||
|
||||
/// \brief BLAKE2s state information
|
||||
/// \since Crypto++ 5.6.4
|
||||
struct CRYPTOPP_NO_VTABLE BLAKE2s_State
|
||||
{
|
||||
BLAKE2s_State() {
|
||||
Reset();
|
||||
}
|
||||
|
||||
void Reset();
|
||||
|
||||
inline word32* h() {
|
||||
return m_hft.data();
|
||||
}
|
||||
|
||||
inline word32* t() {
|
||||
return m_hft.data() + 8;
|
||||
}
|
||||
|
||||
inline word32* f() {
|
||||
return m_hft.data() + 10;
|
||||
}
|
||||
|
||||
inline byte* data() {
|
||||
return m_buf.data();
|
||||
}
|
||||
|
||||
// SSE4, Power7 and NEON depend upon t[] and f[] being side-by-side
|
||||
CRYPTOPP_CONSTANT(BLOCKSIZE = BLAKE2s_Info::BLOCKSIZE);
|
||||
FixedSizeAlignedSecBlock<word32, 8+2+2, true> m_hft;
|
||||
FixedSizeAlignedSecBlock<byte, BLOCKSIZE, true> m_buf;
|
||||
size_t m_len;
|
||||
};
|
||||
|
||||
/// \brief BLAKE2b state information
|
||||
/// \since Crypto++ 5.6.4
|
||||
struct CRYPTOPP_NO_VTABLE BLAKE2b_State
|
||||
{
|
||||
BLAKE2b_State() {
|
||||
Reset();
|
||||
}
|
||||
|
||||
void Reset();
|
||||
|
||||
inline word64* h() {
|
||||
return m_hft.data();
|
||||
}
|
||||
|
||||
inline word64* t() {
|
||||
return m_hft.data() + 8;
|
||||
}
|
||||
|
||||
inline word64* f() {
|
||||
return m_hft.data() + 10;
|
||||
}
|
||||
|
||||
inline byte* data() {
|
||||
return m_buf.data();
|
||||
}
|
||||
|
||||
// SSE4, Power8 and NEON depend upon t[] and f[] being side-by-side
|
||||
CRYPTOPP_CONSTANT(BLOCKSIZE = BLAKE2b_Info::BLOCKSIZE);
|
||||
FixedSizeAlignedSecBlock<word64, 8+2+2, true> m_hft;
|
||||
FixedSizeAlignedSecBlock<byte, BLOCKSIZE, true> m_buf;
|
||||
size_t m_len;
|
||||
};
|
||||
|
||||
/// \brief The BLAKE2s cryptographic hash function
|
||||
/// \details BLAKE2s can function as both a hash and keyed hash. If you want only the hash,
|
||||
/// then use the BLAKE2s constructor that accepts no parameters or digest size. If you
|
||||
/// want a keyed hash, then use the constructor that accpts the key as a parameter.
|
||||
/// Once a key and digest size are selected, its effectively immutable. The Restart()
|
||||
/// method that accepts a ParameterBlock does not allow you to change it.
|
||||
/// \sa Aumasson, Neves, Wilcox-O'Hearn and Winnerlein's
|
||||
/// <A HREF="http://blake2.net/blake2.pdf">BLAKE2: simpler, smaller, fast as MD5</A> (2013.01.29).
|
||||
/// \since C++ since Crypto++ 5.6.4, SSE since Crypto++ 5.6.4, NEON since Crypto++ 6.0,
|
||||
/// Power8 since Crypto++ 8.0
|
||||
class BLAKE2s : public SimpleKeyingInterfaceImpl<MessageAuthenticationCode, BLAKE2s_Info>
|
||||
{
|
||||
public:
|
||||
CRYPTOPP_CONSTANT(DEFAULT_KEYLENGTH = BLAKE2s_Info::DEFAULT_KEYLENGTH);
|
||||
CRYPTOPP_CONSTANT(MIN_KEYLENGTH = BLAKE2s_Info::MIN_KEYLENGTH);
|
||||
CRYPTOPP_CONSTANT(MAX_KEYLENGTH = BLAKE2s_Info::MAX_KEYLENGTH);
|
||||
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE = BLAKE2s_Info::DIGESTSIZE);
|
||||
CRYPTOPP_CONSTANT(BLOCKSIZE = BLAKE2s_Info::BLOCKSIZE);
|
||||
CRYPTOPP_CONSTANT(SALTSIZE = BLAKE2s_Info::SALTSIZE);
|
||||
CRYPTOPP_CONSTANT(PERSONALIZATIONSIZE = BLAKE2s_Info::PERSONALIZATIONSIZE);
|
||||
|
||||
typedef BLAKE2s_State State;
|
||||
typedef BLAKE2s_ParameterBlock ParameterBlock;
|
||||
|
||||
CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "BLAKE2s";}
|
||||
|
||||
virtual ~BLAKE2s() {}
|
||||
|
||||
/// \brief Construct a BLAKE2s hash
|
||||
/// \param digestSize the digest size, in bytes
|
||||
/// \param treeMode flag indicating tree mode
|
||||
/// \since Crypto++ 5.6.4
|
||||
BLAKE2s(bool treeMode=false, unsigned int digestSize = DIGESTSIZE);
|
||||
|
||||
/// \brief Construct a BLAKE2s hash
|
||||
/// \param digestSize the digest size, in bytes
|
||||
/// \details treeMode flag is set to false
|
||||
/// \since Crypto++ 8.2
|
||||
BLAKE2s(unsigned int digestSize);
|
||||
|
||||
/// \brief Construct a BLAKE2s hash
|
||||
/// \param key a byte array used to key the cipher
|
||||
/// \param keyLength the size of the byte array
|
||||
/// \param salt a byte array used as salt
|
||||
/// \param saltLength the size of the byte array
|
||||
/// \param personalization a byte array used as personalization string
|
||||
/// \param personalizationLength the size of the byte array
|
||||
/// \param treeMode flag indicating tree mode
|
||||
/// \param digestSize the digest size, in bytes
|
||||
/// \since Crypto++ 5.6.4
|
||||
BLAKE2s(const byte *key, size_t keyLength, const byte* salt = NULLPTR, size_t saltLength = 0,
|
||||
const byte* personalization = NULLPTR, size_t personalizationLength = 0,
|
||||
bool treeMode=false, unsigned int digestSize = DIGESTSIZE);
|
||||
|
||||
/// \brief Retrieve the object's name
|
||||
/// \return the object's algorithm name following RFC 7693
|
||||
/// \details Object algorithm name follows the naming described in
|
||||
/// <A HREF="http://tools.ietf.org/html/rfc7693#section-4">RFC 7693, The BLAKE2 Cryptographic Hash and
|
||||
/// Message Authentication Code (MAC)</A>. For example, "BLAKE2b-512" and "BLAKE2s-256".
|
||||
std::string AlgorithmName() const {return std::string(BLAKE2s_Info::StaticAlgorithmName()) + "-" + IntToString(DigestSize()*8);}
|
||||
|
||||
unsigned int BlockSize() const {return BLOCKSIZE;}
|
||||
unsigned int DigestSize() const {return m_digestSize;}
|
||||
unsigned int OptimalDataAlignment() const;
|
||||
|
||||
void Update(const byte *input, size_t length);
|
||||
void Restart();
|
||||
|
||||
/// \brief Restart a hash with parameter block and counter
|
||||
/// \param block parameter block
|
||||
/// \param counter counter array
|
||||
/// \details Parameter block is persisted across calls to Restart().
|
||||
void Restart(const BLAKE2s_ParameterBlock& block, const word32 counter[2]);
|
||||
|
||||
/// \brief Set tree mode
|
||||
/// \param mode the new tree mode
|
||||
/// \details BLAKE2 has two finalization flags, called State::f[0] and State::f[1].
|
||||
/// If <tt>treeMode=false</tt> (default), then State::f[1] is never set. If
|
||||
/// <tt>treeMode=true</tt>, then State::f[1] is set when State::f[0] is set.
|
||||
/// Tree mode is persisted across calls to Restart().
|
||||
void SetTreeMode(bool mode) {m_treeMode=mode;}
|
||||
|
||||
/// \brief Get tree mode
|
||||
/// \return the current tree mode
|
||||
/// \details Tree mode is persisted across calls to Restart().
|
||||
bool GetTreeMode() const {return m_treeMode;}
|
||||
|
||||
void TruncatedFinal(byte *hash, size_t size);
|
||||
|
||||
std::string AlgorithmProvider() const;
|
||||
|
||||
protected:
|
||||
// Operates on state buffer and/or input. Must be BLOCKSIZE, final block will pad with 0's.
|
||||
void Compress(const byte *input);
|
||||
inline void IncrementCounter(size_t count=BLOCKSIZE);
|
||||
|
||||
void UncheckedSetKey(const byte* key, unsigned int length, const CryptoPP::NameValuePairs& params);
|
||||
|
||||
private:
|
||||
State m_state;
|
||||
ParameterBlock m_block;
|
||||
AlignedSecByteBlock m_key;
|
||||
word32 m_digestSize, m_keyLength;
|
||||
bool m_treeMode;
|
||||
};
|
||||
|
||||
/// \brief The BLAKE2b cryptographic hash function
|
||||
/// \details BLAKE2b can function as both a hash and keyed hash. If you want only the hash,
|
||||
/// then use the BLAKE2b constructor that accepts no parameters or digest size. If you
|
||||
/// want a keyed hash, then use the constructor that accpts the key as a parameter.
|
||||
/// Once a key and digest size are selected, its effectively immutable. The Restart()
|
||||
/// method that accepts a ParameterBlock does not allow you to change it.
|
||||
/// \sa Aumasson, Neves, Wilcox-O'Hearn and Winnerlein's
|
||||
/// <A HREF="http://blake2.net/blake2.pdf">BLAKE2: simpler, smaller, fast as MD5</A> (2013.01.29).
|
||||
/// \since C++ since Crypto++ 5.6.4, SSE since Crypto++ 5.6.4, NEON since Crypto++ 6.0,
|
||||
/// Power8 since Crypto++ 8.0
|
||||
class BLAKE2b : public SimpleKeyingInterfaceImpl<MessageAuthenticationCode, BLAKE2b_Info>
|
||||
{
|
||||
public:
|
||||
CRYPTOPP_CONSTANT(DEFAULT_KEYLENGTH = BLAKE2b_Info::DEFAULT_KEYLENGTH);
|
||||
CRYPTOPP_CONSTANT(MIN_KEYLENGTH = BLAKE2b_Info::MIN_KEYLENGTH);
|
||||
CRYPTOPP_CONSTANT(MAX_KEYLENGTH = BLAKE2b_Info::MAX_KEYLENGTH);
|
||||
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE = BLAKE2b_Info::DIGESTSIZE);
|
||||
CRYPTOPP_CONSTANT(BLOCKSIZE = BLAKE2b_Info::BLOCKSIZE);
|
||||
CRYPTOPP_CONSTANT(SALTSIZE = BLAKE2b_Info::SALTSIZE);
|
||||
CRYPTOPP_CONSTANT(PERSONALIZATIONSIZE = BLAKE2b_Info::PERSONALIZATIONSIZE);
|
||||
|
||||
typedef BLAKE2b_State State;
|
||||
typedef BLAKE2b_ParameterBlock ParameterBlock;
|
||||
|
||||
CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "BLAKE2b";}
|
||||
|
||||
virtual ~BLAKE2b() {}
|
||||
|
||||
/// \brief Construct a BLAKE2b hash
|
||||
/// \param digestSize the digest size, in bytes
|
||||
/// \param treeMode flag indicating tree mode
|
||||
/// \since Crypto++ 5.6.4
|
||||
BLAKE2b(bool treeMode=false, unsigned int digestSize = DIGESTSIZE);
|
||||
|
||||
/// \brief Construct a BLAKE2s hash
|
||||
/// \param digestSize the digest size, in bytes
|
||||
/// \details treeMode flag is set to false
|
||||
/// \since Crypto++ 8.2
|
||||
BLAKE2b(unsigned int digestSize);
|
||||
|
||||
/// \brief Construct a BLAKE2b hash
|
||||
/// \param key a byte array used to key the cipher
|
||||
/// \param keyLength the size of the byte array
|
||||
/// \param salt a byte array used as salt
|
||||
/// \param saltLength the size of the byte array
|
||||
/// \param personalization a byte array used as personalization string
|
||||
/// \param personalizationLength the size of the byte array
|
||||
/// \param treeMode flag indicating tree mode
|
||||
/// \param digestSize the digest size, in bytes
|
||||
/// \since Crypto++ 5.6.4
|
||||
BLAKE2b(const byte *key, size_t keyLength, const byte* salt = NULLPTR, size_t saltLength = 0,
|
||||
const byte* personalization = NULLPTR, size_t personalizationLength = 0,
|
||||
bool treeMode=false, unsigned int digestSize = DIGESTSIZE);
|
||||
|
||||
/// \brief Retrieve the object's name
|
||||
/// \return the object's algorithm name following RFC 7693
|
||||
/// \details Object algorithm name follows the naming described in
|
||||
/// <A HREF="http://tools.ietf.org/html/rfc7693#section-4">RFC 7693, The BLAKE2 Cryptographic Hash and
|
||||
/// Message Authentication Code (MAC)</A>. For example, "BLAKE2b-512" and "BLAKE2s-256".
|
||||
std::string AlgorithmName() const {return std::string(BLAKE2b_Info::StaticAlgorithmName()) + "-" + IntToString(DigestSize()*8);}
|
||||
|
||||
unsigned int BlockSize() const {return BLOCKSIZE;}
|
||||
unsigned int DigestSize() const {return m_digestSize;}
|
||||
unsigned int OptimalDataAlignment() const;
|
||||
|
||||
void Update(const byte *input, size_t length);
|
||||
void Restart();
|
||||
|
||||
/// \brief Restart a hash with parameter block and counter
|
||||
/// \param block parameter block
|
||||
/// \param counter counter array
|
||||
/// \details Parameter block is persisted across calls to Restart().
|
||||
void Restart(const BLAKE2b_ParameterBlock& block, const word64 counter[2]);
|
||||
|
||||
/// \brief Set tree mode
|
||||
/// \param mode the new tree mode
|
||||
/// \details BLAKE2 has two finalization flags, called State::f[0] and State::f[1].
|
||||
/// If <tt>treeMode=false</tt> (default), then State::f[1] is never set. If
|
||||
/// <tt>treeMode=true</tt>, then State::f[1] is set when State::f[0] is set.
|
||||
/// Tree mode is persisted across calls to Restart().
|
||||
void SetTreeMode(bool mode) {m_treeMode=mode;}
|
||||
|
||||
/// \brief Get tree mode
|
||||
/// \return the current tree mode
|
||||
/// \details Tree mode is persisted across calls to Restart().
|
||||
bool GetTreeMode() const {return m_treeMode;}
|
||||
|
||||
void TruncatedFinal(byte *hash, size_t size);
|
||||
|
||||
std::string AlgorithmProvider() const;
|
||||
|
||||
protected:
|
||||
|
||||
// Operates on state buffer and/or input. Must be BLOCKSIZE, final block will pad with 0's.
|
||||
void Compress(const byte *input);
|
||||
inline void IncrementCounter(size_t count=BLOCKSIZE);
|
||||
|
||||
void UncheckedSetKey(const byte* key, unsigned int length, const CryptoPP::NameValuePairs& params);
|
||||
|
||||
private:
|
||||
State m_state;
|
||||
ParameterBlock m_block;
|
||||
AlignedSecByteBlock m_key;
|
||||
word32 m_digestSize, m_keyLength;
|
||||
bool m_treeMode;
|
||||
};
|
||||
|
||||
NAMESPACE_END
|
||||
|
||||
#endif
|
||||
@ -0,0 +1,54 @@
|
||||
// blowfish.h - originally written and placed in the public domain by Wei Dai
|
||||
|
||||
/// \file blowfish.h
|
||||
/// \brief Classes for the Blowfish block cipher
|
||||
|
||||
#ifndef CRYPTOPP_BLOWFISH_H
|
||||
#define CRYPTOPP_BLOWFISH_H
|
||||
|
||||
#include "seckey.h"
|
||||
#include "secblock.h"
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
/// \brief Blowfish block cipher information
|
||||
struct Blowfish_Info : public FixedBlockSize<8>, public VariableKeyLength<16, 4, 56>, public FixedRounds<16>
|
||||
{
|
||||
CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "Blowfish";}
|
||||
};
|
||||
|
||||
// <a href="http://www.cryptopp.com/wiki/Blowfish">Blowfish</a>
|
||||
|
||||
/// \brief Blowfish block cipher
|
||||
/// \since Crypto++ 1.0
|
||||
class Blowfish : public Blowfish_Info, public BlockCipherDocumentation
|
||||
{
|
||||
/// \brief Class specific implementation and overrides used to operate the cipher.
|
||||
/// \details Implementations and overrides in \p Base apply to both \p ENCRYPTION and \p DECRYPTION directions
|
||||
class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<Blowfish_Info>
|
||||
{
|
||||
public:
|
||||
void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
|
||||
void UncheckedSetKey(const byte *key_string, unsigned int keylength, const NameValuePairs ¶ms);
|
||||
|
||||
private:
|
||||
void crypt_block(const word32 in[2], word32 out[2]) const;
|
||||
|
||||
static const word32 p_init[ROUNDS+2];
|
||||
static const word32 s_init[4*256];
|
||||
|
||||
FixedSizeSecBlock<word32, ROUNDS+2> pbox;
|
||||
FixedSizeSecBlock<word32, 4*256> sbox;
|
||||
};
|
||||
|
||||
public:
|
||||
typedef BlockCipherFinal<ENCRYPTION, Base> Encryption;
|
||||
typedef BlockCipherFinal<DECRYPTION, Base> Decryption;
|
||||
};
|
||||
|
||||
typedef Blowfish::Encryption BlowfishEncryption;
|
||||
typedef Blowfish::Decryption BlowfishDecryption;
|
||||
|
||||
NAMESPACE_END
|
||||
|
||||
#endif
|
||||
@ -0,0 +1,70 @@
|
||||
// blumshub.h - originally written and placed in the public domain by Wei Dai
|
||||
|
||||
/// \file blumshub.h
|
||||
/// \brief Classes for Blum Blum Shub generator
|
||||
|
||||
#ifndef CRYPTOPP_BLUMSHUB_H
|
||||
#define CRYPTOPP_BLUMSHUB_H
|
||||
|
||||
#include "cryptlib.h"
|
||||
#include "modarith.h"
|
||||
#include "integer.h"
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
/// \brief BlumBlumShub without factorization of the modulus
|
||||
/// \details You should reseed the generator after a fork() to avoid multiple generators
|
||||
/// with the same internal state.
|
||||
class PublicBlumBlumShub : public RandomNumberGenerator,
|
||||
public StreamTransformation
|
||||
{
|
||||
public:
|
||||
virtual ~PublicBlumBlumShub() {}
|
||||
|
||||
/// \brief Construct a PublicBlumBlumShub
|
||||
/// \param n the modulus
|
||||
/// \param seed the seed for the generator
|
||||
/// \details seed is the secret key and should be about as large as n.
|
||||
PublicBlumBlumShub(const Integer &n, const Integer &seed);
|
||||
|
||||
unsigned int GenerateBit();
|
||||
byte GenerateByte();
|
||||
void GenerateBlock(byte *output, size_t size);
|
||||
void ProcessData(byte *outString, const byte *inString, size_t length);
|
||||
|
||||
bool IsSelfInverting() const {return true;}
|
||||
bool IsForwardTransformation() const {return true;}
|
||||
|
||||
protected:
|
||||
ModularArithmetic modn;
|
||||
Integer current;
|
||||
word maxBits, bitsLeft;
|
||||
};
|
||||
|
||||
/// \brief BlumBlumShub with factorization of the modulus
|
||||
/// \details You should reseed the generator after a fork() to avoid multiple generators
|
||||
/// with the same internal state.
|
||||
class BlumBlumShub : public PublicBlumBlumShub
|
||||
{
|
||||
public:
|
||||
virtual ~BlumBlumShub() {}
|
||||
|
||||
/// \brief Construct a BlumBlumShub
|
||||
/// \param p the first prime factor
|
||||
/// \param q the second prime factor
|
||||
/// \param seed the seed for the generator
|
||||
/// \details Esure p and q are both primes congruent to 3 mod 4 and at least 512 bits long.
|
||||
/// seed is the secret key and should be about as large as p*q.
|
||||
BlumBlumShub(const Integer &p, const Integer &q, const Integer &seed);
|
||||
|
||||
bool IsRandomAccess() const {return true;}
|
||||
void Seek(lword index);
|
||||
|
||||
protected:
|
||||
const Integer p, q;
|
||||
const Integer x0;
|
||||
};
|
||||
|
||||
NAMESPACE_END
|
||||
|
||||
#endif
|
||||
@ -0,0 +1,49 @@
|
||||
// camellia.h - originally written and placed in the public domain by Wei Dai
|
||||
|
||||
/// \file camellia.h
|
||||
/// \brief Classes for the Camellia block cipher
|
||||
|
||||
#ifndef CRYPTOPP_CAMELLIA_H
|
||||
#define CRYPTOPP_CAMELLIA_H
|
||||
|
||||
#include "config.h"
|
||||
#include "seckey.h"
|
||||
#include "secblock.h"
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
/// \brief Camellia block cipher information
|
||||
struct Camellia_Info : public FixedBlockSize<16>, public VariableKeyLength<16, 16, 32, 8>
|
||||
{
|
||||
CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "Camellia";}
|
||||
};
|
||||
|
||||
/// \brief Camellia block cipher
|
||||
/// \sa <a href="http://www.cryptopp.com/wiki/Camellia">Camellia</a>
|
||||
class Camellia : public Camellia_Info, public BlockCipherDocumentation
|
||||
{
|
||||
class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<Camellia_Info>
|
||||
{
|
||||
public:
|
||||
void UncheckedSetKey(const byte *key, unsigned int keylen, const NameValuePairs ¶ms);
|
||||
void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
|
||||
|
||||
protected:
|
||||
CRYPTOPP_ALIGN_DATA(4) static const byte s1[256];
|
||||
static const word32 SP[4][256];
|
||||
|
||||
unsigned int m_rounds;
|
||||
SecBlock<word32> m_key;
|
||||
};
|
||||
|
||||
public:
|
||||
typedef BlockCipherFinal<ENCRYPTION, Base> Encryption;
|
||||
typedef BlockCipherFinal<DECRYPTION, Base> Decryption;
|
||||
};
|
||||
|
||||
typedef Camellia::Encryption CamelliaEncryption;
|
||||
typedef Camellia::Decryption CamelliaDecryption;
|
||||
|
||||
NAMESPACE_END
|
||||
|
||||
#endif
|
||||
109
build-clang/vcpkg_installed/x64-windows/include/cryptopp/cast.h
Normal file
109
build-clang/vcpkg_installed/x64-windows/include/cryptopp/cast.h
Normal file
@ -0,0 +1,109 @@
|
||||
// cast.h - originally written and placed in the public domain by Wei Dai
|
||||
|
||||
/// \file cast.h
|
||||
/// \brief Classes for the CAST-128 and CAST-256 block ciphers
|
||||
/// \since Crypto++ 2.2
|
||||
|
||||
#ifndef CRYPTOPP_CAST_H
|
||||
#define CRYPTOPP_CAST_H
|
||||
|
||||
#include "seckey.h"
|
||||
#include "secblock.h"
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
/// \brief CAST block cipher base
|
||||
/// \since Crypto++ 2.2
|
||||
class CAST
|
||||
{
|
||||
protected:
|
||||
static const word32 S[8][256];
|
||||
};
|
||||
|
||||
/// \brief CAST128 block cipher information
|
||||
/// \since Crypto++ 2.2
|
||||
struct CAST128_Info : public FixedBlockSize<8>, public VariableKeyLength<16, 5, 16>
|
||||
{
|
||||
CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "CAST-128";}
|
||||
};
|
||||
|
||||
/// \brief CAST128 block cipher
|
||||
/// \sa <a href="http://www.cryptopp.com/wiki/CAST-128">CAST-128</a>
|
||||
/// \since Crypto++ 2.2
|
||||
class CAST128 : public CAST128_Info, public BlockCipherDocumentation
|
||||
{
|
||||
/// \brief CAST128 block cipher default operation
|
||||
class CRYPTOPP_NO_VTABLE Base : public CAST, public BlockCipherImpl<CAST128_Info>
|
||||
{
|
||||
public:
|
||||
void UncheckedSetKey(const byte *userKey, unsigned int length, const NameValuePairs ¶ms);
|
||||
|
||||
protected:
|
||||
bool reduced;
|
||||
FixedSizeSecBlock<word32, 32> K;
|
||||
mutable FixedSizeSecBlock<word32, 3> m_t;
|
||||
};
|
||||
|
||||
/// \brief CAST128 block cipher encryption operation
|
||||
class CRYPTOPP_NO_VTABLE Enc : public Base
|
||||
{
|
||||
public:
|
||||
void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
|
||||
};
|
||||
|
||||
/// \brief CAST128 block cipher decryption operation
|
||||
class CRYPTOPP_NO_VTABLE Dec : public Base
|
||||
{
|
||||
public:
|
||||
void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
|
||||
};
|
||||
|
||||
public:
|
||||
typedef BlockCipherFinal<ENCRYPTION, Enc> Encryption;
|
||||
typedef BlockCipherFinal<DECRYPTION, Dec> Decryption;
|
||||
};
|
||||
|
||||
/// \brief CAST256 block cipher information
|
||||
/// \since Crypto++ 4.0
|
||||
struct CAST256_Info : public FixedBlockSize<16>, public VariableKeyLength<16, 16, 32, 4>
|
||||
{
|
||||
CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "CAST-256";}
|
||||
};
|
||||
|
||||
/// \brief CAST256 block cipher
|
||||
/// \sa <a href="http://www.cryptopp.com/wiki/CAST-256">CAST-256</a>
|
||||
/// \since Crypto++ 4.0
|
||||
class CAST256 : public CAST256_Info, public BlockCipherDocumentation
|
||||
{
|
||||
/// \brief CAST256 block cipher default operation
|
||||
class CRYPTOPP_NO_VTABLE Base : public CAST, public BlockCipherImpl<CAST256_Info>
|
||||
{
|
||||
public:
|
||||
void UncheckedSetKey(const byte *userKey, unsigned int length, const NameValuePairs ¶ms);
|
||||
void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
|
||||
|
||||
protected:
|
||||
static const word32 t_m[8][24];
|
||||
static const unsigned int t_r[8][24];
|
||||
|
||||
static void Omega(int i, word32 kappa[8]);
|
||||
|
||||
FixedSizeSecBlock<word32, 8*12> K;
|
||||
mutable FixedSizeSecBlock<word32, 8> kappa;
|
||||
mutable FixedSizeSecBlock<word32, 3> m_t;
|
||||
};
|
||||
|
||||
public:
|
||||
typedef BlockCipherFinal<ENCRYPTION, Base> Encryption;
|
||||
typedef BlockCipherFinal<DECRYPTION, Base> Decryption;
|
||||
};
|
||||
|
||||
typedef CAST128::Encryption CAST128Encryption;
|
||||
typedef CAST128::Decryption CAST128Decryption;
|
||||
|
||||
typedef CAST256::Encryption CAST256Encryption;
|
||||
typedef CAST256::Decryption CAST256Decryption;
|
||||
|
||||
NAMESPACE_END
|
||||
|
||||
#endif
|
||||
@ -0,0 +1,63 @@
|
||||
// cbcmac.h - originally written and placed in the public domain by Wei Dai
|
||||
|
||||
/// \file
|
||||
/// \brief Classes for CBC MAC
|
||||
/// \since Crypto++ 3.1
|
||||
|
||||
#ifndef CRYPTOPP_CBCMAC_H
|
||||
#define CRYPTOPP_CBCMAC_H
|
||||
|
||||
#include "seckey.h"
|
||||
#include "secblock.h"
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
/// \brief CBC-MAC base class
|
||||
/// \since Crypto++ 3.1
|
||||
class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE CBC_MAC_Base : public MessageAuthenticationCode
|
||||
{
|
||||
public:
|
||||
CBC_MAC_Base() : m_counter(0) {}
|
||||
|
||||
void UncheckedSetKey(const byte *key, unsigned int length, const NameValuePairs ¶ms);
|
||||
void Update(const byte *input, size_t length);
|
||||
void TruncatedFinal(byte *mac, size_t size);
|
||||
unsigned int DigestSize() const {return const_cast<CBC_MAC_Base*>(this)->AccessCipher().BlockSize();}
|
||||
|
||||
protected:
|
||||
virtual BlockCipher & AccessCipher() =0;
|
||||
|
||||
private:
|
||||
void ProcessBuf();
|
||||
SecByteBlock m_reg;
|
||||
unsigned int m_counter;
|
||||
};
|
||||
|
||||
/// \brief CBC-MAC
|
||||
/// \tparam T BlockCipherDocumentation derived class
|
||||
/// \details CBC-MAC is compatible with FIPS 113. The MAC is secure only for fixed
|
||||
/// length messages. For variable length messages use CMAC or DMAC.
|
||||
/// \sa <a href="http://www.weidai.com/scan-mirror/mac.html#CBC-MAC">CBC-MAC</a>
|
||||
/// \since Crypto++ 3.1
|
||||
template <class T>
|
||||
class CBC_MAC : public MessageAuthenticationCodeImpl<CBC_MAC_Base, CBC_MAC<T> >, public SameKeyLengthAs<T>
|
||||
{
|
||||
public:
|
||||
/// \brief Construct a CBC_MAC
|
||||
CBC_MAC() {}
|
||||
/// \brief Construct a CBC_MAC
|
||||
/// \param key a byte buffer used to key the cipher
|
||||
/// \param length the length of the byte buffer
|
||||
CBC_MAC(const byte *key, size_t length=SameKeyLengthAs<T>::DEFAULT_KEYLENGTH)
|
||||
{this->SetKey(key, length);}
|
||||
|
||||
static std::string StaticAlgorithmName() {return std::string("CBC-MAC(") + T::StaticAlgorithmName() + ")";}
|
||||
|
||||
private:
|
||||
BlockCipher & AccessCipher() {return m_cipher;}
|
||||
typename T::Encryption m_cipher;
|
||||
};
|
||||
|
||||
NAMESPACE_END
|
||||
|
||||
#endif
|
||||
123
build-clang/vcpkg_installed/x64-windows/include/cryptopp/ccm.h
Normal file
123
build-clang/vcpkg_installed/x64-windows/include/cryptopp/ccm.h
Normal file
@ -0,0 +1,123 @@
|
||||
// ccm.h - originally written and placed in the public domain by Wei Dai
|
||||
|
||||
/// \file ccm.h
|
||||
/// \brief CCM block cipher mode of operation
|
||||
/// \since Crypto++ 5.6.0
|
||||
|
||||
#ifndef CRYPTOPP_CCM_H
|
||||
#define CRYPTOPP_CCM_H
|
||||
|
||||
#include "authenc.h"
|
||||
#include "modes.h"
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
/// \brief CCM block cipher base implementation
|
||||
/// \details Base implementation of the AuthenticatedSymmetricCipher interface
|
||||
/// \since Crypto++ 5.6.0
|
||||
class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE CCM_Base : public AuthenticatedSymmetricCipherBase
|
||||
{
|
||||
public:
|
||||
CCM_Base()
|
||||
: m_digestSize(0), m_L(0), m_messageLength(0), m_aadLength(0) {}
|
||||
|
||||
// AuthenticatedSymmetricCipher
|
||||
std::string AlgorithmName() const
|
||||
{return GetBlockCipher().AlgorithmName() + std::string("/CCM");}
|
||||
std::string AlgorithmProvider() const
|
||||
{return GetBlockCipher().AlgorithmProvider();}
|
||||
size_t MinKeyLength() const
|
||||
{return GetBlockCipher().MinKeyLength();}
|
||||
size_t MaxKeyLength() const
|
||||
{return GetBlockCipher().MaxKeyLength();}
|
||||
size_t DefaultKeyLength() const
|
||||
{return GetBlockCipher().DefaultKeyLength();}
|
||||
size_t GetValidKeyLength(size_t keylength) const
|
||||
{return GetBlockCipher().GetValidKeyLength(keylength);}
|
||||
bool IsValidKeyLength(size_t keylength) const
|
||||
{return GetBlockCipher().IsValidKeyLength(keylength);}
|
||||
unsigned int OptimalDataAlignment() const
|
||||
{return GetBlockCipher().OptimalDataAlignment();}
|
||||
IV_Requirement IVRequirement() const
|
||||
{return UNIQUE_IV;}
|
||||
unsigned int IVSize() const
|
||||
{return 8;}
|
||||
unsigned int MinIVLength() const
|
||||
{return 7;}
|
||||
unsigned int MaxIVLength() const
|
||||
{return 13;}
|
||||
unsigned int DigestSize() const
|
||||
{return m_digestSize;}
|
||||
lword MaxHeaderLength() const
|
||||
{return W64LIT(0)-1;}
|
||||
lword MaxMessageLength() const
|
||||
{return m_L<8 ? (W64LIT(1)<<(8*m_L))-1 : W64LIT(0)-1;}
|
||||
bool NeedsPrespecifiedDataLengths() const
|
||||
{return true;}
|
||||
void UncheckedSpecifyDataLengths(lword headerLength, lword messageLength, lword footerLength);
|
||||
|
||||
protected:
|
||||
// AuthenticatedSymmetricCipherBase
|
||||
bool AuthenticationIsOnPlaintext() const
|
||||
{return true;}
|
||||
unsigned int AuthenticationBlockSize() const
|
||||
{return GetBlockCipher().BlockSize();}
|
||||
void SetKeyWithoutResync(const byte *userKey, size_t keylength, const NameValuePairs ¶ms);
|
||||
void Resync(const byte *iv, size_t len);
|
||||
size_t AuthenticateBlocks(const byte *data, size_t len);
|
||||
void AuthenticateLastHeaderBlock();
|
||||
void AuthenticateLastConfidentialBlock();
|
||||
void AuthenticateLastFooterBlock(byte *mac, size_t macSize);
|
||||
SymmetricCipher & AccessSymmetricCipher() {return m_ctr;}
|
||||
|
||||
virtual BlockCipher & AccessBlockCipher() =0;
|
||||
virtual int DefaultDigestSize() const =0;
|
||||
|
||||
const BlockCipher & GetBlockCipher() const {return const_cast<CCM_Base *>(this)->AccessBlockCipher();}
|
||||
byte *CBC_Buffer() {return m_buffer+REQUIRED_BLOCKSIZE;}
|
||||
|
||||
enum {REQUIRED_BLOCKSIZE = 16};
|
||||
int m_digestSize, m_L;
|
||||
word64 m_messageLength, m_aadLength;
|
||||
CTR_Mode_ExternalCipher::Encryption m_ctr;
|
||||
};
|
||||
|
||||
/// \brief CCM block cipher final implementation
|
||||
/// \tparam T_BlockCipher block cipher
|
||||
/// \tparam T_DefaultDigestSize default digest size, in bytes
|
||||
/// \tparam T_IsEncryption direction in which to operate the cipher
|
||||
/// \since Crypto++ 5.6.0
|
||||
template <class T_BlockCipher, int T_DefaultDigestSize, bool T_IsEncryption>
|
||||
class CCM_Final : public CCM_Base
|
||||
{
|
||||
public:
|
||||
static std::string StaticAlgorithmName()
|
||||
{return T_BlockCipher::StaticAlgorithmName() + std::string("/CCM");}
|
||||
bool IsForwardTransformation() const
|
||||
{return T_IsEncryption;}
|
||||
|
||||
private:
|
||||
BlockCipher & AccessBlockCipher() {return m_cipher;}
|
||||
int DefaultDigestSize() const {return T_DefaultDigestSize;}
|
||||
typename T_BlockCipher::Encryption m_cipher;
|
||||
};
|
||||
|
||||
/// \brief CCM block cipher mode of operation
|
||||
/// \tparam T_BlockCipher block cipher
|
||||
/// \tparam T_DefaultDigestSize default digest size, in bytes
|
||||
/// \details \p CCM provides the \p Encryption and \p Decryption typedef. See GCM_Base
|
||||
/// and GCM_Final for the AuthenticatedSymmetricCipher implementation.
|
||||
/// \sa <a href="http://www.cryptopp.com/wiki/CCM_Mode">CCM Mode</a> and
|
||||
/// <A HREF="http://www.cryptopp.com/wiki/Modes_of_Operation">Modes of Operation</A>
|
||||
/// on the Crypto++ wiki.
|
||||
/// \since Crypto++ 5.6.0
|
||||
template <class T_BlockCipher, int T_DefaultDigestSize = 16>
|
||||
struct CCM : public AuthenticatedSymmetricCipherDocumentation
|
||||
{
|
||||
typedef CCM_Final<T_BlockCipher, T_DefaultDigestSize, true> Encryption;
|
||||
typedef CCM_Final<T_BlockCipher, T_DefaultDigestSize, false> Decryption;
|
||||
};
|
||||
|
||||
NAMESPACE_END
|
||||
|
||||
#endif
|
||||
@ -0,0 +1,223 @@
|
||||
// chacha.h - written and placed in the public domain by Jeffrey Walton.
|
||||
// Based on Wei Dai's Salsa20, Botan's SSE2 implementation,
|
||||
// and Bernstein's reference ChaCha family implementation at
|
||||
// http://cr.yp.to/chacha.html.
|
||||
|
||||
// The library added Bernstein's ChaCha classes at Crypto++ 5.6.4. The IETF
|
||||
// uses a slightly different implementation than Bernstein, and the IETF
|
||||
// ChaCha and XChaCha classes were added at Crypto++ 8.1. We wanted to maintain
|
||||
// ABI compatibility at the 8.1 release so the original ChaCha classes were not
|
||||
// disturbed. Instead new classes were added for IETF ChaCha. The back-end
|
||||
// implementation shares code as expected, however.
|
||||
|
||||
/// \file chacha.h
|
||||
/// \brief Classes for ChaCha8, ChaCha12 and ChaCha20 stream ciphers
|
||||
/// \details Crypto++ provides Bernstein and ECRYPT's ChaCha from <a
|
||||
/// href="http://cr.yp.to/chacha/chacha-20080128.pdf">ChaCha, a
|
||||
/// variant of Salsa20</a> (2008.01.28). Crypto++ also provides the
|
||||
/// IETF implementation of ChaCha using the ChaChaTLS name. Bernstein's
|
||||
/// implementation is _slightly_ different from the TLS working group's
|
||||
/// implementation for cipher suites
|
||||
/// <tt>TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256</tt>,
|
||||
/// <tt>TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256</tt>,
|
||||
/// and <tt>TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256</tt>. Finally,
|
||||
/// the library provides <a
|
||||
/// href="https://tools.ietf.org/html/draft-arciszewski-xchacha">XChaCha:
|
||||
/// eXtended-nonce ChaCha and AEAD_XChaCha20_Poly1305 (rev. 03)</a>.
|
||||
/// \since ChaCha since Crypto++ 5.6.4, ChaChaTLS and XChaCha20 since Crypto++ 8.1
|
||||
|
||||
#ifndef CRYPTOPP_CHACHA_H
|
||||
#define CRYPTOPP_CHACHA_H
|
||||
|
||||
#include "strciphr.h"
|
||||
#include "secblock.h"
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
////////////////////////////// Bernstein ChaCha //////////////////////////////
|
||||
|
||||
/// \brief ChaCha stream cipher information
|
||||
/// \since Crypto++ 5.6.4
|
||||
struct ChaCha_Info : public VariableKeyLength<32, 16, 32, 16, SimpleKeyingInterface::UNIQUE_IV, 8>
|
||||
{
|
||||
/// \brief The algorithm name
|
||||
/// \return the algorithm name
|
||||
/// \details StaticAlgorithmName returns the algorithm's name as a static
|
||||
/// member function.
|
||||
/// \details Bernstein named the cipher variants ChaCha8, ChaCha12 and
|
||||
/// ChaCha20. More generally, Bernstein called the family ChaCha{r}.
|
||||
/// AlgorithmName() provides the exact name once rounds are set.
|
||||
static const char* StaticAlgorithmName() {
|
||||
return "ChaCha";
|
||||
}
|
||||
};
|
||||
|
||||
/// \brief ChaCha stream cipher implementation
|
||||
/// \since Crypto++ 5.6.4
|
||||
class CRYPTOPP_NO_VTABLE ChaCha_Policy : public AdditiveCipherConcretePolicy<word32, 16>
|
||||
{
|
||||
public:
|
||||
virtual ~ChaCha_Policy() {}
|
||||
ChaCha_Policy() : m_rounds(ROUNDS) {}
|
||||
|
||||
protected:
|
||||
void CipherSetKey(const NameValuePairs ¶ms, const byte *key, size_t length);
|
||||
void OperateKeystream(KeystreamOperation operation, byte *output, const byte *input, size_t iterationCount);
|
||||
void CipherResynchronize(byte *keystreamBuffer, const byte *IV, size_t length);
|
||||
bool CipherIsRandomAccess() const {return true;}
|
||||
void SeekToIteration(lword iterationCount);
|
||||
unsigned int GetAlignment() const;
|
||||
unsigned int GetOptimalBlockSize() const;
|
||||
|
||||
std::string AlgorithmName() const;
|
||||
std::string AlgorithmProvider() const;
|
||||
|
||||
CRYPTOPP_CONSTANT(ROUNDS = 20); // Default rounds
|
||||
FixedSizeAlignedSecBlock<word32, 16> m_state;
|
||||
unsigned int m_rounds;
|
||||
};
|
||||
|
||||
/// \brief ChaCha stream cipher
|
||||
/// \details This is Bernstein and ECRYPT's ChaCha. It is _slightly_ different
|
||||
/// from the IETF's version of ChaCha called ChaChaTLS.
|
||||
/// \sa <a href="http://cr.yp.to/chacha/chacha-20080208.pdf">ChaCha, a variant
|
||||
/// of Salsa20</a> (2008.01.28).
|
||||
/// \since Crypto++ 5.6.4
|
||||
struct ChaCha : public ChaCha_Info, public SymmetricCipherDocumentation
|
||||
{
|
||||
/// \brief ChaCha Encryption
|
||||
typedef SymmetricCipherFinal<ConcretePolicyHolder<ChaCha_Policy, AdditiveCipherTemplate<> >, ChaCha_Info > Encryption;
|
||||
/// \brief ChaCha Decryption
|
||||
typedef Encryption Decryption;
|
||||
};
|
||||
|
||||
////////////////////////////// IETF ChaChaTLS //////////////////////////////
|
||||
|
||||
/// \brief IETF ChaCha20 stream cipher information
|
||||
/// \since Crypto++ 8.1
|
||||
struct ChaChaTLS_Info : public FixedKeyLength<32, SimpleKeyingInterface::UNIQUE_IV, 12>, FixedRounds<20>
|
||||
{
|
||||
/// \brief The algorithm name
|
||||
/// \return the algorithm name
|
||||
/// \details StaticAlgorithmName returns the algorithm's name as a static
|
||||
/// member function.
|
||||
/// \details This is the IETF's variant of Bernstein's ChaCha from RFC
|
||||
/// 8439. IETF ChaCha is called ChaChaTLS in the Crypto++ library. It
|
||||
/// is _slightly_ different from Bernstein's implementation.
|
||||
static const char* StaticAlgorithmName() {
|
||||
return "ChaChaTLS";
|
||||
}
|
||||
};
|
||||
|
||||
/// \brief IETF ChaCha20 stream cipher implementation
|
||||
/// \since Crypto++ 8.1
|
||||
class CRYPTOPP_NO_VTABLE ChaChaTLS_Policy : public AdditiveCipherConcretePolicy<word32, 16>
|
||||
{
|
||||
public:
|
||||
virtual ~ChaChaTLS_Policy() {}
|
||||
ChaChaTLS_Policy() : m_counter(0) {}
|
||||
|
||||
protected:
|
||||
void CipherSetKey(const NameValuePairs ¶ms, const byte *key, size_t length);
|
||||
void OperateKeystream(KeystreamOperation operation, byte *output, const byte *input, size_t iterationCount);
|
||||
void CipherResynchronize(byte *keystreamBuffer, const byte *IV, size_t length);
|
||||
bool CipherIsRandomAccess() const {return true;}
|
||||
void SeekToIteration(lword iterationCount);
|
||||
unsigned int GetAlignment() const;
|
||||
unsigned int GetOptimalBlockSize() const;
|
||||
|
||||
std::string AlgorithmName() const;
|
||||
std::string AlgorithmProvider() const;
|
||||
|
||||
FixedSizeAlignedSecBlock<word32, 16+8> m_state;
|
||||
unsigned int m_counter;
|
||||
CRYPTOPP_CONSTANT(ROUNDS = ChaChaTLS_Info::ROUNDS);
|
||||
CRYPTOPP_CONSTANT(KEY = 16); // Index into m_state
|
||||
CRYPTOPP_CONSTANT(CTR = 24); // Index into m_state
|
||||
};
|
||||
|
||||
/// \brief IETF ChaCha20 stream cipher
|
||||
/// \details This is the IETF's variant of Bernstein's ChaCha from RFC 8439.
|
||||
/// IETF ChaCha is called ChaChaTLS in the Crypto++ library. It is
|
||||
/// _slightly_ different from the Bernstein implementation. ChaCha-TLS
|
||||
/// can be used for cipher suites
|
||||
/// <tt>TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256</tt>,
|
||||
/// <tt>TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256</tt>, and
|
||||
/// <tt>TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256</tt>.
|
||||
/// \sa <a href="https://tools.ietf.org/html/rfc8439">RFC 8439, ChaCha20 and
|
||||
/// Poly1305 for IETF Protocols</a>, <A
|
||||
/// HREF="https://mailarchive.ietf.org/arch/msg/cfrg/gsOnTJzcbgG6OqD8Sc0GO5aR_tU">How
|
||||
/// to handle block counter wrap in IETF's ChaCha algorithm?</A> and
|
||||
/// <A HREF="https://github.com/weidai11/cryptopp/issues/790">Issue
|
||||
/// 790, ChaChaTLS results when counter block wraps</A>.
|
||||
/// \since Crypto++ 8.1
|
||||
struct ChaChaTLS : public ChaChaTLS_Info, public SymmetricCipherDocumentation
|
||||
{
|
||||
/// \brief ChaCha-TLS Encryption
|
||||
typedef SymmetricCipherFinal<ConcretePolicyHolder<ChaChaTLS_Policy, AdditiveCipherTemplate<> >, ChaChaTLS_Info > Encryption;
|
||||
/// \brief ChaCha-TLS Decryption
|
||||
typedef Encryption Decryption;
|
||||
};
|
||||
|
||||
////////////////////////////// IETF XChaCha20 draft //////////////////////////////
|
||||
|
||||
/// \brief IETF XChaCha20 stream cipher information
|
||||
/// \since Crypto++ 8.1
|
||||
struct XChaCha20_Info : public FixedKeyLength<32, SimpleKeyingInterface::UNIQUE_IV, 24>
|
||||
{
|
||||
/// \brief The algorithm name
|
||||
/// \return the algorithm name
|
||||
/// \details StaticAlgorithmName returns the algorithm's name as a static
|
||||
/// member function.
|
||||
/// \details This is the IETF's XChaCha from draft-arciszewski-xchacha.
|
||||
static const char* StaticAlgorithmName() {
|
||||
return "XChaCha20";
|
||||
}
|
||||
};
|
||||
|
||||
/// \brief IETF XChaCha20 stream cipher implementation
|
||||
/// \since Crypto++ 8.1
|
||||
class CRYPTOPP_NO_VTABLE XChaCha20_Policy : public AdditiveCipherConcretePolicy<word32, 16>
|
||||
{
|
||||
public:
|
||||
virtual ~XChaCha20_Policy() {}
|
||||
XChaCha20_Policy() : m_counter(0), m_rounds(ROUNDS) {}
|
||||
|
||||
protected:
|
||||
void CipherSetKey(const NameValuePairs ¶ms, const byte *key, size_t length);
|
||||
void OperateKeystream(KeystreamOperation operation, byte *output, const byte *input, size_t iterationCount);
|
||||
void CipherResynchronize(byte *keystreamBuffer, const byte *IV, size_t length);
|
||||
bool CipherIsRandomAccess() const {return false;}
|
||||
void SeekToIteration(lword iterationCount);
|
||||
unsigned int GetAlignment() const;
|
||||
unsigned int GetOptimalBlockSize() const;
|
||||
|
||||
std::string AlgorithmName() const;
|
||||
std::string AlgorithmProvider() const;
|
||||
|
||||
FixedSizeAlignedSecBlock<word32, 16+8> m_state;
|
||||
unsigned int m_counter, m_rounds;
|
||||
CRYPTOPP_CONSTANT(ROUNDS = 20); // Default rounds
|
||||
CRYPTOPP_CONSTANT(KEY = 16); // Index into m_state
|
||||
};
|
||||
|
||||
/// \brief IETF XChaCha20 stream cipher
|
||||
/// \details This is the IETF's XChaCha from draft-arciszewski-xchacha.
|
||||
/// \sa <a href="https://tools.ietf.org/html/draft-arciszewski-xchacha">XChaCha:
|
||||
/// eXtended-nonce ChaCha and AEAD_XChaCha20_Poly1305 (rev. 03)</a>, <A
|
||||
/// HREF="https://mailarchive.ietf.org/arch/msg/cfrg/gsOnTJzcbgG6OqD8Sc0GO5aR_tU">How
|
||||
/// to handle block counter wrap in IETF's ChaCha algorithm?</A> and
|
||||
/// <A HREF="https://github.com/weidai11/cryptopp/issues/790">Issue
|
||||
/// 790, ChaCha20 results when counter block wraps</A>.
|
||||
/// \since Crypto++ 8.1
|
||||
struct XChaCha20 : public XChaCha20_Info, public SymmetricCipherDocumentation
|
||||
{
|
||||
/// \brief XChaCha Encryption
|
||||
typedef SymmetricCipherFinal<ConcretePolicyHolder<XChaCha20_Policy, AdditiveCipherTemplate<> >, XChaCha20_Info > Encryption;
|
||||
/// \brief XChaCha Decryption
|
||||
typedef Encryption Decryption;
|
||||
};
|
||||
|
||||
NAMESPACE_END
|
||||
|
||||
#endif // CRYPTOPP_CHACHA_H
|
||||
@ -0,0 +1,322 @@
|
||||
// chachapoly.h - written and placed in the public domain by Jeffrey Walton
|
||||
// RFC 8439, Section 2.8, AEAD Construction, http://tools.ietf.org/html/rfc8439
|
||||
|
||||
/// \file chachapoly.h
|
||||
/// \brief IETF ChaCha20/Poly1305 AEAD scheme
|
||||
/// \details ChaCha20Poly1305 is an authenticated encryption scheme that combines
|
||||
/// ChaCha20TLS and Poly1305TLS. The scheme is defined in RFC 8439, section 2.8,
|
||||
/// AEAD_CHACHA20_POLY1305 construction, and uses the IETF versions of ChaCha20
|
||||
/// and Poly1305.
|
||||
/// \sa <A HREF="http://tools.ietf.org/html/rfc8439">RFC 8439, ChaCha20 and Poly1305
|
||||
/// for IETF Protocols</A>.
|
||||
/// \since Crypto++ 8.1
|
||||
|
||||
#ifndef CRYPTOPP_CHACHA_POLY1305_H
|
||||
#define CRYPTOPP_CHACHA_POLY1305_H
|
||||
|
||||
#include "cryptlib.h"
|
||||
#include "authenc.h"
|
||||
#include "chacha.h"
|
||||
#include "poly1305.h"
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
////////////////////////////// IETF ChaChaTLS //////////////////////////////
|
||||
|
||||
/// \brief IETF ChaCha20Poly1305 cipher base implementation
|
||||
/// \details Base implementation of the AuthenticatedSymmetricCipher interface
|
||||
/// \since Crypto++ 8.1
|
||||
class ChaCha20Poly1305_Base : public AuthenticatedSymmetricCipherBase
|
||||
{
|
||||
public:
|
||||
CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName()
|
||||
{return "ChaCha20/Poly1305";}
|
||||
|
||||
virtual ~ChaCha20Poly1305_Base() {}
|
||||
|
||||
// AuthenticatedSymmetricCipher
|
||||
std::string AlgorithmName() const
|
||||
{return std::string("ChaCha20/Poly1305");}
|
||||
std::string AlgorithmProvider() const
|
||||
{return GetSymmetricCipher().AlgorithmProvider();}
|
||||
size_t MinKeyLength() const
|
||||
{return 32;}
|
||||
size_t MaxKeyLength() const
|
||||
{return 32;}
|
||||
size_t DefaultKeyLength() const
|
||||
{return 32;}
|
||||
size_t GetValidKeyLength(size_t n) const
|
||||
{CRYPTOPP_UNUSED(n); return 32;}
|
||||
bool IsValidKeyLength(size_t n) const
|
||||
{return n==32;}
|
||||
unsigned int OptimalDataAlignment() const
|
||||
{return GetSymmetricCipher().OptimalDataAlignment();}
|
||||
IV_Requirement IVRequirement() const
|
||||
{return UNIQUE_IV;}
|
||||
unsigned int IVSize() const
|
||||
{return 12;}
|
||||
unsigned int MinIVLength() const
|
||||
{return 12;}
|
||||
unsigned int MaxIVLength() const
|
||||
{return 12;}
|
||||
unsigned int DigestSize() const
|
||||
{return 16;}
|
||||
lword MaxHeaderLength() const
|
||||
{return LWORD_MAX;} // 2^64-1 bytes
|
||||
lword MaxMessageLength() const
|
||||
{return W64LIT(274877906880);} // 2^38-1 blocks
|
||||
lword MaxFooterLength() const
|
||||
{return 0;}
|
||||
|
||||
/// \brief Encrypts and calculates a MAC in one call
|
||||
/// \param ciphertext the encryption buffer
|
||||
/// \param mac the mac buffer
|
||||
/// \param macSize the size of the MAC buffer, in bytes
|
||||
/// \param iv the iv buffer
|
||||
/// \param ivLength the size of the IV buffer, in bytes
|
||||
/// \param aad the AAD buffer
|
||||
/// \param aadLength the size of the AAD buffer, in bytes
|
||||
/// \param message the message buffer
|
||||
/// \param messageLength the size of the messagetext buffer, in bytes
|
||||
/// \details EncryptAndAuthenticate() encrypts and generates the MAC in one call. The function
|
||||
/// truncates the MAC if <tt>macSize < TagSize()</tt>.
|
||||
virtual void EncryptAndAuthenticate(byte *ciphertext, byte *mac, size_t macSize, const byte *iv, int ivLength, const byte *aad, size_t aadLength, const byte *message, size_t messageLength);
|
||||
|
||||
/// \brief Decrypts and verifies a MAC in one call
|
||||
/// \param message the decryption buffer
|
||||
/// \param mac the mac buffer
|
||||
/// \param macSize the size of the MAC buffer, in bytes
|
||||
/// \param iv the iv buffer
|
||||
/// \param ivLength the size of the IV buffer, in bytes
|
||||
/// \param aad the AAD buffer
|
||||
/// \param aadLength the size of the AAD buffer, in bytes
|
||||
/// \param ciphertext the cipher buffer
|
||||
/// \param ciphertextLength the size of the ciphertext buffer, in bytes
|
||||
/// \return true if the MAC is valid and the decoding succeeded, false otherwise
|
||||
/// \details DecryptAndVerify() decrypts and verifies the MAC in one call.
|
||||
/// <tt>message</tt> is a decryption buffer and should be at least as large as the ciphertext buffer.
|
||||
/// \details The function returns true iff MAC is valid. DecryptAndVerify() assumes the MAC
|
||||
/// is truncated if <tt>macLength < TagSize()</tt>.
|
||||
virtual bool DecryptAndVerify(byte *message, const byte *mac, size_t macSize, const byte *iv, int ivLength, const byte *aad, size_t aadLength, const byte *ciphertext, size_t ciphertextLength);
|
||||
|
||||
protected:
|
||||
// AuthenticatedSymmetricCipherBase
|
||||
bool AuthenticationIsOnPlaintext() const {return false;}
|
||||
unsigned int AuthenticationBlockSize() const {return 1;}
|
||||
void SetKeyWithoutResync(const byte *userKey, size_t keylength, const NameValuePairs ¶ms);
|
||||
void Resync(const byte *iv, size_t len);
|
||||
size_t AuthenticateBlocks(const byte *data, size_t len);
|
||||
void AuthenticateLastHeaderBlock();
|
||||
void AuthenticateLastConfidentialBlock();
|
||||
void AuthenticateLastFooterBlock(byte *mac, size_t macSize);
|
||||
|
||||
// See comments in chachapoly.cpp
|
||||
void RekeyCipherAndMac(const byte *userKey, size_t userKeyLength, const NameValuePairs ¶ms);
|
||||
|
||||
virtual const MessageAuthenticationCode & GetMAC() const = 0;
|
||||
virtual MessageAuthenticationCode & AccessMAC() = 0;
|
||||
|
||||
private:
|
||||
SecByteBlock m_userKey;
|
||||
};
|
||||
|
||||
/// \brief IETF ChaCha20Poly1305 cipher final implementation
|
||||
/// \tparam T_IsEncryption flag indicating cipher direction
|
||||
/// \details ChaCha20Poly1305 is an authenticated encryption scheme that combines
|
||||
/// ChaCha20TLS and Poly1305TLS. The scheme is defined in RFC 8439, section 2.8,
|
||||
/// AEAD_CHACHA20_POLY1305 construction, and uses the IETF versions of ChaCha20
|
||||
/// and Poly1305.
|
||||
/// \sa <A HREF="http://tools.ietf.org/html/rfc8439">RFC 8439, ChaCha20 and Poly1305
|
||||
/// for IETF Protocols</A>.
|
||||
/// \since Crypto++ 8.1
|
||||
template <bool T_IsEncryption>
|
||||
class ChaCha20Poly1305_Final : public ChaCha20Poly1305_Base
|
||||
{
|
||||
public:
|
||||
virtual ~ChaCha20Poly1305_Final() {}
|
||||
|
||||
protected:
|
||||
const SymmetricCipher & GetSymmetricCipher()
|
||||
{return const_cast<ChaCha20Poly1305_Final *>(this)->AccessSymmetricCipher();}
|
||||
SymmetricCipher & AccessSymmetricCipher()
|
||||
{return m_cipher;}
|
||||
bool IsForwardTransformation() const
|
||||
{return T_IsEncryption;}
|
||||
|
||||
const MessageAuthenticationCode & GetMAC() const
|
||||
{return const_cast<ChaCha20Poly1305_Final *>(this)->AccessMAC();}
|
||||
MessageAuthenticationCode & AccessMAC()
|
||||
{return m_mac;}
|
||||
|
||||
private:
|
||||
ChaChaTLS::Encryption m_cipher;
|
||||
Poly1305TLS m_mac;
|
||||
};
|
||||
|
||||
/// \brief IETF ChaCha20/Poly1305 AEAD scheme
|
||||
/// \details ChaCha20Poly1305 is an authenticated encryption scheme that combines
|
||||
/// ChaCha20TLS and Poly1305TLS. The scheme is defined in RFC 8439, section 2.8,
|
||||
/// AEAD_CHACHA20_POLY1305 construction, and uses the IETF versions of ChaCha20
|
||||
/// and Poly1305.
|
||||
/// \sa <A HREF="http://tools.ietf.org/html/rfc8439">RFC 8439, ChaCha20 and Poly1305
|
||||
/// for IETF Protocols</A>.
|
||||
/// \since Crypto++ 8.1
|
||||
struct ChaCha20Poly1305 : public AuthenticatedSymmetricCipherDocumentation
|
||||
{
|
||||
/// \brief ChaCha20Poly1305 encryption
|
||||
typedef ChaCha20Poly1305_Final<true> Encryption;
|
||||
/// \brief ChaCha20Poly1305 decryption
|
||||
typedef ChaCha20Poly1305_Final<false> Decryption;
|
||||
};
|
||||
|
||||
////////////////////////////// IETF XChaCha20 draft //////////////////////////////
|
||||
|
||||
/// \brief IETF XChaCha20Poly1305 cipher base implementation
|
||||
/// \details Base implementation of the AuthenticatedSymmetricCipher interface
|
||||
/// \since Crypto++ 8.1
|
||||
class XChaCha20Poly1305_Base : public AuthenticatedSymmetricCipherBase
|
||||
{
|
||||
public:
|
||||
CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName()
|
||||
{return "XChaCha20/Poly1305";}
|
||||
|
||||
virtual ~XChaCha20Poly1305_Base() {}
|
||||
|
||||
// AuthenticatedSymmetricCipher
|
||||
std::string AlgorithmName() const
|
||||
{return std::string("XChaCha20/Poly1305");}
|
||||
std::string AlgorithmProvider() const
|
||||
{return GetSymmetricCipher().AlgorithmProvider();}
|
||||
size_t MinKeyLength() const
|
||||
{return 32;}
|
||||
size_t MaxKeyLength() const
|
||||
{return 32;}
|
||||
size_t DefaultKeyLength() const
|
||||
{return 32;}
|
||||
size_t GetValidKeyLength(size_t n) const
|
||||
{CRYPTOPP_UNUSED(n); return 32;}
|
||||
bool IsValidKeyLength(size_t n) const
|
||||
{return n==32;}
|
||||
unsigned int OptimalDataAlignment() const
|
||||
{return GetSymmetricCipher().OptimalDataAlignment();}
|
||||
IV_Requirement IVRequirement() const
|
||||
{return UNIQUE_IV;}
|
||||
unsigned int IVSize() const
|
||||
{return 24;}
|
||||
unsigned int MinIVLength() const
|
||||
{return 24;}
|
||||
unsigned int MaxIVLength() const
|
||||
{return 24;}
|
||||
unsigned int DigestSize() const
|
||||
{return 16;}
|
||||
lword MaxHeaderLength() const
|
||||
{return LWORD_MAX;} // 2^64-1 bytes
|
||||
lword MaxMessageLength() const
|
||||
{return W64LIT(274877906880);} // 2^38-1 blocks
|
||||
lword MaxFooterLength() const
|
||||
{return 0;}
|
||||
|
||||
/// \brief Encrypts and calculates a MAC in one call
|
||||
/// \param ciphertext the encryption buffer
|
||||
/// \param mac the mac buffer
|
||||
/// \param macSize the size of the MAC buffer, in bytes
|
||||
/// \param iv the iv buffer
|
||||
/// \param ivLength the size of the IV buffer, in bytes
|
||||
/// \param aad the AAD buffer
|
||||
/// \param aadLength the size of the AAD buffer, in bytes
|
||||
/// \param message the message buffer
|
||||
/// \param messageLength the size of the messagetext buffer, in bytes
|
||||
/// \details EncryptAndAuthenticate() encrypts and generates the MAC in one call. The function
|
||||
/// truncates the MAC if <tt>macSize < TagSize()</tt>.
|
||||
virtual void EncryptAndAuthenticate(byte *ciphertext, byte *mac, size_t macSize, const byte *iv, int ivLength, const byte *aad, size_t aadLength, const byte *message, size_t messageLength);
|
||||
|
||||
/// \brief Decrypts and verifies a MAC in one call
|
||||
/// \param message the decryption buffer
|
||||
/// \param mac the mac buffer
|
||||
/// \param macSize the size of the MAC buffer, in bytes
|
||||
/// \param iv the iv buffer
|
||||
/// \param ivLength the size of the IV buffer, in bytes
|
||||
/// \param aad the AAD buffer
|
||||
/// \param aadLength the size of the AAD buffer, in bytes
|
||||
/// \param ciphertext the cipher buffer
|
||||
/// \param ciphertextLength the size of the ciphertext buffer, in bytes
|
||||
/// \return true if the MAC is valid and the decoding succeeded, false otherwise
|
||||
/// \details DecryptAndVerify() decrypts and verifies the MAC in one call.
|
||||
/// <tt>message</tt> is a decryption buffer and should be at least as large as the ciphertext buffer.
|
||||
/// \details The function returns true iff MAC is valid. DecryptAndVerify() assumes the MAC
|
||||
/// is truncated if <tt>macLength < TagSize()</tt>.
|
||||
virtual bool DecryptAndVerify(byte *message, const byte *mac, size_t macSize, const byte *iv, int ivLength, const byte *aad, size_t aadLength, const byte *ciphertext, size_t ciphertextLength);
|
||||
|
||||
protected:
|
||||
// AuthenticatedSymmetricCipherBase
|
||||
bool AuthenticationIsOnPlaintext() const {return false;}
|
||||
unsigned int AuthenticationBlockSize() const {return 1;}
|
||||
void SetKeyWithoutResync(const byte *userKey, size_t keylength, const NameValuePairs ¶ms);
|
||||
void Resync(const byte *iv, size_t len);
|
||||
size_t AuthenticateBlocks(const byte *data, size_t len);
|
||||
void AuthenticateLastHeaderBlock();
|
||||
void AuthenticateLastConfidentialBlock();
|
||||
void AuthenticateLastFooterBlock(byte *mac, size_t macSize);
|
||||
|
||||
// See comments in chachapoly.cpp
|
||||
void RekeyCipherAndMac(const byte *userKey, size_t userKeyLength, const NameValuePairs ¶ms);
|
||||
|
||||
virtual const MessageAuthenticationCode & GetMAC() const = 0;
|
||||
virtual MessageAuthenticationCode & AccessMAC() = 0;
|
||||
|
||||
private:
|
||||
SecByteBlock m_userKey;
|
||||
};
|
||||
|
||||
/// \brief IETF XChaCha20Poly1305 cipher final implementation
|
||||
/// \tparam T_IsEncryption flag indicating cipher direction
|
||||
/// \details XChaCha20Poly1305 is an authenticated encryption scheme that combines
|
||||
/// XChaCha20 and Poly1305-TLS. The scheme is defined in RFC 8439, section 2.8,
|
||||
/// AEAD_CHACHA20_POLY1305 construction, and uses the IETF versions of ChaCha20
|
||||
/// and Poly1305.
|
||||
/// \sa <A HREF="http://tools.ietf.org/html/rfc8439">RFC 8439, ChaCha20 and Poly1305
|
||||
/// for IETF Protocols</A>.
|
||||
/// \since Crypto++ 8.1
|
||||
template <bool T_IsEncryption>
|
||||
class XChaCha20Poly1305_Final : public XChaCha20Poly1305_Base
|
||||
{
|
||||
public:
|
||||
virtual ~XChaCha20Poly1305_Final() {}
|
||||
|
||||
protected:
|
||||
const SymmetricCipher & GetSymmetricCipher()
|
||||
{return const_cast<XChaCha20Poly1305_Final *>(this)->AccessSymmetricCipher();}
|
||||
SymmetricCipher & AccessSymmetricCipher()
|
||||
{return m_cipher;}
|
||||
bool IsForwardTransformation() const
|
||||
{return T_IsEncryption;}
|
||||
|
||||
const MessageAuthenticationCode & GetMAC() const
|
||||
{return const_cast<XChaCha20Poly1305_Final *>(this)->AccessMAC();}
|
||||
MessageAuthenticationCode & AccessMAC()
|
||||
{return m_mac;}
|
||||
|
||||
private:
|
||||
XChaCha20::Encryption m_cipher;
|
||||
Poly1305TLS m_mac;
|
||||
};
|
||||
|
||||
/// \brief IETF XChaCha20/Poly1305 AEAD scheme
|
||||
/// \details XChaCha20Poly1305 is an authenticated encryption scheme that combines
|
||||
/// XChaCha20 and Poly1305-TLS. The scheme is defined in RFC 8439, section 2.8,
|
||||
/// AEAD_XCHACHA20_POLY1305 construction, and uses the IETF versions of ChaCha20
|
||||
/// and Poly1305.
|
||||
/// \sa <A HREF="http://tools.ietf.org/html/rfc8439">RFC 8439, ChaCha20 and Poly1305
|
||||
/// for IETF Protocols</A>.
|
||||
/// \since Crypto++ 8.1
|
||||
struct XChaCha20Poly1305 : public AuthenticatedSymmetricCipherDocumentation
|
||||
{
|
||||
/// \brief XChaCha20Poly1305 encryption
|
||||
typedef XChaCha20Poly1305_Final<true> Encryption;
|
||||
/// \brief XChaCha20Poly1305 decryption
|
||||
typedef XChaCha20Poly1305_Final<false> Decryption;
|
||||
};
|
||||
|
||||
NAMESPACE_END
|
||||
|
||||
#endif // CRYPTOPP_CHACHA_POLY1305_H
|
||||
179
build-clang/vcpkg_installed/x64-windows/include/cryptopp/cham.h
Normal file
179
build-clang/vcpkg_installed/x64-windows/include/cryptopp/cham.h
Normal file
@ -0,0 +1,179 @@
|
||||
// cham.h - written and placed in the public domain by Kim Sung Hee and Jeffrey Walton
|
||||
// Based on "CHAM: A Family of Lightweight Block Ciphers for
|
||||
// Resource-Constrained Devices" by Bonwook Koo, Dongyoung Roh,
|
||||
// Hyeonjin Kim, Younghoon Jung, Dong-Geon Lee, and Daesung Kwon
|
||||
|
||||
/// \file cham.h
|
||||
/// \brief Classes for the CHAM block cipher
|
||||
/// \since Crypto++ 8.0
|
||||
|
||||
#ifndef CRYPTOPP_CHAM_H
|
||||
#define CRYPTOPP_CHAM_H
|
||||
|
||||
#include "config.h"
|
||||
#include "seckey.h"
|
||||
#include "secblock.h"
|
||||
#include "algparam.h"
|
||||
|
||||
#if (CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X86)
|
||||
# define CRYPTOPP_CHAM128_ADVANCED_PROCESS_BLOCKS 1
|
||||
#endif
|
||||
|
||||
// Yet another SunStudio/SunCC workaround. Failed self tests
|
||||
// in SSE code paths on i386 for SunStudio 12.3 and below.
|
||||
#if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x5120)
|
||||
# undef CRYPTOPP_CHAM128_ADVANCED_PROCESS_BLOCKS
|
||||
#endif
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
/// \brief CHAM block cipher information
|
||||
/// \since Crypto++ 8.0
|
||||
struct CHAM64_Info : public FixedBlockSize<8>, public FixedKeyLength<16>
|
||||
{
|
||||
/// \brief The algorithm name
|
||||
/// \return the algorithm name
|
||||
/// \details StaticAlgorithmName returns the algorithm's name as a static
|
||||
/// member function.
|
||||
static const std::string StaticAlgorithmName()
|
||||
{
|
||||
// Format is Cipher-Blocksize
|
||||
return "CHAM-64";
|
||||
}
|
||||
};
|
||||
|
||||
/// \brief CHAM block cipher information
|
||||
/// \since Crypto++ 8.0
|
||||
struct CHAM128_Info : public FixedBlockSize<16>, public VariableKeyLength<16,16,32,16>
|
||||
{
|
||||
/// \brief The algorithm name
|
||||
/// \return the algorithm name
|
||||
/// \details StaticAlgorithmName returns the algorithm's name as a static
|
||||
/// member function.
|
||||
static const std::string StaticAlgorithmName()
|
||||
{
|
||||
// Format is Cipher-Blocksize
|
||||
return "CHAM-128";
|
||||
}
|
||||
};
|
||||
|
||||
/// \brief CHAM 64-bit block cipher
|
||||
/// \details CHAM64 provides 64-bit block size. The valid key size is 128-bit.
|
||||
/// \note Crypto++ provides a byte oriented implementation
|
||||
/// \sa CHAM128, <a href="http://www.cryptopp.com/wiki/CHAM">CHAM</a>,
|
||||
/// <a href="https://pdfs.semanticscholar.org/2f57/61b5c2614cffd58a09cc83c375a2b32a2ed3.pdf">
|
||||
/// CHAM: A Family of Lightweight Block Ciphers for Resource-Constrained Devices</a>
|
||||
/// \since Crypto++ 8.0
|
||||
class CRYPTOPP_NO_VTABLE CHAM64 : public CHAM64_Info, public BlockCipherDocumentation
|
||||
{
|
||||
public:
|
||||
/// \brief CHAM block cipher transformation functions
|
||||
/// \details Provides implementation common to encryption and decryption
|
||||
/// \since Crypto++ 8.0
|
||||
class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<CHAM64_Info>
|
||||
{
|
||||
protected:
|
||||
void UncheckedSetKey(const byte *userKey, unsigned int keyLength, const NameValuePairs ¶ms);
|
||||
|
||||
SecBlock<word16> m_rk;
|
||||
mutable FixedSizeSecBlock<word16, 4> m_x;
|
||||
unsigned int m_kw;
|
||||
};
|
||||
|
||||
/// \brief Encryption transformation
|
||||
/// \details Enc provides implementation for encryption transformation. All key and block
|
||||
/// sizes are supported.
|
||||
/// \since Crypto++ 8.0
|
||||
class CRYPTOPP_NO_VTABLE Enc : public Base
|
||||
{
|
||||
public:
|
||||
void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
|
||||
};
|
||||
|
||||
/// \brief Decryption transformation
|
||||
/// \details Dec provides implementation for decryption transformation. All key and block
|
||||
/// sizes are supported.
|
||||
/// \since Crypto++ 8.0
|
||||
class CRYPTOPP_NO_VTABLE Dec : public Base
|
||||
{
|
||||
public:
|
||||
void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
|
||||
};
|
||||
|
||||
/// \brief CHAM64 encryption
|
||||
typedef BlockCipherFinal<ENCRYPTION, Enc> Encryption;
|
||||
/// \brief CHAM64 decryption
|
||||
typedef BlockCipherFinal<DECRYPTION, Dec> Decryption;
|
||||
};
|
||||
|
||||
/// \brief CHAM64 encryption
|
||||
typedef CHAM64::Encryption CHAM64Encryption;
|
||||
/// \brief CHAM64 decryption
|
||||
typedef CHAM64::Decryption CHAM64Decryption;
|
||||
|
||||
/// \brief CHAM 128-bit block cipher
|
||||
/// \details CHAM128 provides 128-bit block size. The valid key size is 128-bit and 256-bit.
|
||||
/// \note Crypto++ provides a byte oriented implementation
|
||||
/// \sa CHAM64, <a href="http://www.cryptopp.com/wiki/CHAM">CHAM</a>,
|
||||
/// <a href="https://pdfs.semanticscholar.org/2f57/61b5c2614cffd58a09cc83c375a2b32a2ed3.pdf">
|
||||
/// CHAM: A Family of Lightweight Block Ciphers for Resource-Constrained Devices</a>
|
||||
/// \since Crypto++ 8.0
|
||||
class CRYPTOPP_NO_VTABLE CHAM128 : public CHAM128_Info, public BlockCipherDocumentation
|
||||
{
|
||||
public:
|
||||
/// \brief CHAM block cipher transformation functions
|
||||
/// \details Provides implementation common to encryption and decryption
|
||||
/// \since Crypto++ 8.0
|
||||
class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<CHAM128_Info>
|
||||
{
|
||||
protected:
|
||||
void UncheckedSetKey(const byte *userKey, unsigned int keyLength, const NameValuePairs ¶ms);
|
||||
std::string AlgorithmProvider() const;
|
||||
|
||||
SecBlock<word32> m_rk;
|
||||
mutable FixedSizeSecBlock<word32, 4> m_x;
|
||||
unsigned int m_kw;
|
||||
};
|
||||
|
||||
/// \brief Encryption transformation
|
||||
/// \details Enc provides implementation for encryption transformation. All key and block
|
||||
/// sizes are supported.
|
||||
/// \since Crypto++ 8.0
|
||||
class CRYPTOPP_NO_VTABLE Enc : public Base
|
||||
{
|
||||
public:
|
||||
void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
|
||||
|
||||
#if CRYPTOPP_CHAM128_ADVANCED_PROCESS_BLOCKS
|
||||
size_t AdvancedProcessBlocks(const byte *inBlocks, const byte *xorBlocks, byte *outBlocks, size_t length, word32 flags) const;
|
||||
#endif
|
||||
};
|
||||
|
||||
/// \brief Decryption transformation
|
||||
/// \details Dec provides implementation for decryption transformation. All key and block
|
||||
/// sizes are supported.
|
||||
/// \since Crypto++ 8.0
|
||||
class CRYPTOPP_NO_VTABLE Dec : public Base
|
||||
{
|
||||
public:
|
||||
void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
|
||||
|
||||
#if CRYPTOPP_CHAM128_ADVANCED_PROCESS_BLOCKS
|
||||
size_t AdvancedProcessBlocks(const byte *inBlocks, const byte *xorBlocks, byte *outBlocks, size_t length, word32 flags) const;
|
||||
#endif
|
||||
};
|
||||
|
||||
/// \brief CHAM128 encryption
|
||||
typedef BlockCipherFinal<ENCRYPTION, Enc> Encryption;
|
||||
/// \brief CHAM128 decryption
|
||||
typedef BlockCipherFinal<DECRYPTION, Dec> Decryption;
|
||||
};
|
||||
|
||||
/// \brief CHAM128 encryption
|
||||
typedef CHAM128::Encryption CHAM128Encryption;
|
||||
/// \brief CHAM128 decryption
|
||||
typedef CHAM128::Decryption CHAM128Decryption;
|
||||
|
||||
NAMESPACE_END
|
||||
|
||||
#endif // CRYPTOPP_CHAM_H
|
||||
@ -0,0 +1,142 @@
|
||||
// channels.h - originally written and placed in the public domain by Wei Dai
|
||||
|
||||
/// \file channels.h
|
||||
/// \brief Classes for multiple named channels
|
||||
|
||||
#ifndef CRYPTOPP_CHANNELS_H
|
||||
#define CRYPTOPP_CHANNELS_H
|
||||
|
||||
#include "cryptlib.h"
|
||||
#include "simple.h"
|
||||
#include "smartptr.h"
|
||||
#include "stdcpp.h"
|
||||
|
||||
#if CRYPTOPP_MSC_VERSION
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable: 4355)
|
||||
#endif
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
#if 0
|
||||
/// Route input on default channel to different and/or multiple channels based on message sequence number
|
||||
class MessageSwitch : public Sink
|
||||
{
|
||||
public:
|
||||
void AddDefaultRoute(BufferedTransformation &destination, const std::string &channel);
|
||||
void AddRoute(unsigned int begin, unsigned int end, BufferedTransformation &destination, const std::string &channel);
|
||||
|
||||
void Put(byte inByte);
|
||||
void Put(const byte *inString, unsigned int length);
|
||||
|
||||
void Flush(bool completeFlush, int propagation=-1);
|
||||
void MessageEnd(int propagation=-1);
|
||||
void PutMessageEnd(const byte *inString, unsigned int length, int propagation=-1);
|
||||
void MessageSeriesEnd(int propagation=-1);
|
||||
|
||||
private:
|
||||
typedef std::pair<BufferedTransformation *, std::string> Route;
|
||||
struct RangeRoute
|
||||
{
|
||||
RangeRoute(unsigned int begin, unsigned int end, const Route &route)
|
||||
: begin(begin), end(end), route(route) {}
|
||||
bool operator<(const RangeRoute &rhs) const {return begin < rhs.begin;}
|
||||
unsigned int begin, end;
|
||||
Route route;
|
||||
};
|
||||
|
||||
typedef std::list<RangeRoute> RouteList;
|
||||
typedef std::list<Route> DefaultRouteList;
|
||||
|
||||
RouteList m_routes;
|
||||
DefaultRouteList m_defaultRoutes;
|
||||
unsigned int m_nCurrentMessage;
|
||||
};
|
||||
#endif
|
||||
|
||||
class ChannelSwitchTypedefs
|
||||
{
|
||||
public:
|
||||
typedef std::pair<BufferedTransformation *, std::string> Route;
|
||||
typedef std::multimap<std::string, Route> RouteMap;
|
||||
|
||||
typedef std::pair<BufferedTransformation *, value_ptr<std::string> > DefaultRoute;
|
||||
typedef std::list<DefaultRoute> DefaultRouteList;
|
||||
|
||||
// SunCC workaround: can't use const_iterator here
|
||||
typedef RouteMap::iterator MapIterator;
|
||||
typedef DefaultRouteList::iterator ListIterator;
|
||||
};
|
||||
|
||||
class ChannelSwitch;
|
||||
|
||||
class ChannelRouteIterator : public ChannelSwitchTypedefs
|
||||
{
|
||||
public:
|
||||
ChannelRouteIterator(ChannelSwitch &cs) : m_cs(cs), m_useDefault(false) {}
|
||||
|
||||
void Reset(const std::string &channel);
|
||||
bool End() const;
|
||||
void Next();
|
||||
BufferedTransformation & Destination();
|
||||
const std::string & Channel();
|
||||
|
||||
ChannelSwitch& m_cs;
|
||||
std::string m_channel;
|
||||
bool m_useDefault;
|
||||
MapIterator m_itMapCurrent, m_itMapEnd;
|
||||
ListIterator m_itListCurrent, m_itListEnd;
|
||||
|
||||
protected:
|
||||
// Hide this to see if we break something...
|
||||
ChannelRouteIterator();
|
||||
};
|
||||
|
||||
/// Route input to different and/or multiple channels based on channel ID
|
||||
class CRYPTOPP_DLL ChannelSwitch : public Multichannel<Sink>, public ChannelSwitchTypedefs
|
||||
{
|
||||
public:
|
||||
ChannelSwitch() : m_it(*this), m_blocked(false) {}
|
||||
ChannelSwitch(BufferedTransformation &destination) : m_it(*this), m_blocked(false)
|
||||
{
|
||||
AddDefaultRoute(destination);
|
||||
}
|
||||
ChannelSwitch(BufferedTransformation &destination, const std::string &outChannel) : m_it(*this), m_blocked(false)
|
||||
{
|
||||
AddDefaultRoute(destination, outChannel);
|
||||
}
|
||||
|
||||
void IsolatedInitialize(const NameValuePairs ¶meters=g_nullNameValuePairs);
|
||||
|
||||
size_t ChannelPut2(const std::string &channel, const byte *begin, size_t length, int messageEnd, bool blocking);
|
||||
size_t ChannelPutModifiable2(const std::string &channel, byte *begin, size_t length, int messageEnd, bool blocking);
|
||||
|
||||
bool ChannelFlush(const std::string &channel, bool completeFlush, int propagation=-1, bool blocking=true);
|
||||
bool ChannelMessageSeriesEnd(const std::string &channel, int propagation=-1, bool blocking=true);
|
||||
|
||||
byte * ChannelCreatePutSpace(const std::string &channel, size_t &size);
|
||||
|
||||
void AddDefaultRoute(BufferedTransformation &destination);
|
||||
void RemoveDefaultRoute(BufferedTransformation &destination);
|
||||
void AddDefaultRoute(BufferedTransformation &destination, const std::string &outChannel);
|
||||
void RemoveDefaultRoute(BufferedTransformation &destination, const std::string &outChannel);
|
||||
void AddRoute(const std::string &inChannel, BufferedTransformation &destination, const std::string &outChannel);
|
||||
void RemoveRoute(const std::string &inChannel, BufferedTransformation &destination, const std::string &outChannel);
|
||||
|
||||
private:
|
||||
RouteMap m_routeMap;
|
||||
DefaultRouteList m_defaultRoutes;
|
||||
|
||||
ChannelRouteIterator m_it;
|
||||
bool m_blocked;
|
||||
|
||||
friend class ChannelRouteIterator;
|
||||
};
|
||||
|
||||
NAMESPACE_END
|
||||
|
||||
#if CRYPTOPP_MSC_VERSION
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@ -0,0 +1,76 @@
|
||||
// cmac.h - originally written and placed in the public domain by Wei Dai
|
||||
|
||||
/// \file cmac.h
|
||||
/// \brief Classes for CMAC message authentication code
|
||||
/// \since Crypto++ 5.6.0
|
||||
|
||||
#ifndef CRYPTOPP_CMAC_H
|
||||
#define CRYPTOPP_CMAC_H
|
||||
|
||||
#include "seckey.h"
|
||||
#include "secblock.h"
|
||||
|
||||
/// \brief Enable CMAC and wide block ciphers
|
||||
/// \details CMAC is only defined for AES. The library can support wide
|
||||
/// block ciphers like Kaylna and Threefish since we know the polynomials.
|
||||
#ifndef CRYPTOPP_CMAC_WIDE_BLOCK_CIPHERS
|
||||
# define CRYPTOPP_CMAC_WIDE_BLOCK_CIPHERS 1
|
||||
#endif // CRYPTOPP_CMAC_WIDE_BLOCK_CIPHERS
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
/// \brief CMAC base implementation
|
||||
/// \since Crypto++ 5.6.0
|
||||
class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE CMAC_Base : public MessageAuthenticationCode
|
||||
{
|
||||
public:
|
||||
|
||||
virtual ~CMAC_Base() {}
|
||||
CMAC_Base() : m_counter(0) {}
|
||||
|
||||
void UncheckedSetKey(const byte *key, unsigned int length, const NameValuePairs ¶ms);
|
||||
void Update(const byte *input, size_t length);
|
||||
void TruncatedFinal(byte *mac, size_t size);
|
||||
unsigned int DigestSize() const {return GetCipher().BlockSize();}
|
||||
unsigned int OptimalBlockSize() const {return GetCipher().BlockSize();}
|
||||
unsigned int OptimalDataAlignment() const {return GetCipher().OptimalDataAlignment();}
|
||||
std::string AlgorithmProvider() const {return GetCipher().AlgorithmProvider();}
|
||||
|
||||
protected:
|
||||
friend class EAX_Base;
|
||||
|
||||
const BlockCipher & GetCipher() const {return const_cast<CMAC_Base*>(this)->AccessCipher();}
|
||||
virtual BlockCipher & AccessCipher() =0;
|
||||
|
||||
void ProcessBuf();
|
||||
SecByteBlock m_reg;
|
||||
unsigned int m_counter;
|
||||
};
|
||||
|
||||
/// \brief CMAC message authentication code
|
||||
/// \tparam T block cipher
|
||||
/// \details Template parameter T should be a class derived from BlockCipherDocumentation, for example AES, with a block size of 8, 16, or 32.
|
||||
/// \sa <a href="http://www.cryptolounge.org/wiki/CMAC">CMAC</a>
|
||||
/// \since Crypto++ 5.6.0
|
||||
template <class T>
|
||||
class CMAC : public MessageAuthenticationCodeImpl<CMAC_Base, CMAC<T> >, public SameKeyLengthAs<T>
|
||||
{
|
||||
public:
|
||||
/// \brief Construct a CMAC
|
||||
CMAC() {}
|
||||
/// \brief Construct a CMAC
|
||||
/// \param key the MAC key
|
||||
/// \param length the key size, in bytes
|
||||
CMAC(const byte *key, size_t length=SameKeyLengthAs<T>::DEFAULT_KEYLENGTH)
|
||||
{this->SetKey(key, length);}
|
||||
|
||||
static std::string StaticAlgorithmName() {return std::string("CMAC(") + T::StaticAlgorithmName() + ")";}
|
||||
|
||||
private:
|
||||
BlockCipher & AccessCipher() {return m_cipher;}
|
||||
typename T::Encryption m_cipher;
|
||||
};
|
||||
|
||||
NAMESPACE_END
|
||||
|
||||
#endif
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user