All Projects → offa → Keygen

offa / Keygen

Licence: gpl-3.0
KeyGen is a generator for keys and passwords.

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Keygen

Openssl Cmake
Build OpenSSL with CMake on MacOS, Win32, Win64 and cross compile for Android, IOS
Stars: ✭ 76 (+590.91%)
Mutual labels:  cmake, openssl
Golang Tls
Simple Golang HTTPS/TLS Examples
Stars: ✭ 857 (+7690.91%)
Mutual labels:  openssl
Camodet
Lightweight Simple CAmera MOtion DETection application.
Stars: ✭ 26 (+136.36%)
Mutual labels:  cmake
Openspatial Windows
Open Spatial Windows SDK
Stars: ✭ 8 (-27.27%)
Mutual labels:  cmake
Physfs Aes
PhysFS 2.0.2 with AES encryption support
Stars: ✭ 7 (-36.36%)
Mutual labels:  cmake
Latency Test
Software and hardware to test VR latency on any device
Stars: ✭ 9 (-18.18%)
Mutual labels:  cmake
Pol
pol /pɵl/ is a modern command line password manager with deniable encryption
Stars: ✭ 25 (+127.27%)
Mutual labels:  password-generator
Microtrac
Software for Open Source Ecology's MicroTrac
Stars: ✭ 11 (+0%)
Mutual labels:  cmake
Nrf Blinky
Stars: ✭ 10 (-9.09%)
Mutual labels:  cmake
Cmake Examples
A collection of as simple as possible, modern CMake projects
Stars: ✭ 843 (+7563.64%)
Mutual labels:  cmake
Bestnote
👊 持续更新,Java Android 近几年最全面的技术点以及面试题 供自己学习使用
Stars: ✭ 841 (+7545.45%)
Mutual labels:  cmake
Moneymanagerex
Money Manager Ex is an easy to use, money management application built with wxWidgets
Stars: ✭ 836 (+7500%)
Mutual labels:  cmake
Gr Gps
GPS receiver for gnuradio
Stars: ✭ 9 (-18.18%)
Mutual labels:  cmake
Cve 2016 8610 Poc
CVE-2016-8610 (SSL Death Alert) PoC
Stars: ✭ 26 (+136.36%)
Mutual labels:  openssl
Envtool
Utility to check and search along environment variables. Or where Python/Cmake/Man-pages/pkg-modules/VCPKG-packages are located.
Stars: ✭ 10 (-9.09%)
Mutual labels:  cmake
C cpp project framework
CMake build system( framework) with kconfig support for C/CPP projects
Stars: ✭ 26 (+136.36%)
Mutual labels:  cmake
Industrial calibration tutorials
Tutorials for industrial calibration package.
Stars: ✭ 7 (-36.36%)
Mutual labels:  cmake
Ios Cmake
A CMake toolchain file for iOS, macOS, watchOS & tvOS C/C++/Obj-C++ development
Stars: ✭ 844 (+7572.73%)
Mutual labels:  cmake
Simple arm 01
Repository for RoboND's ROS Basics Lesson 02
Stars: ✭ 11 (+0%)
Mutual labels:  cmake
Netkiller.github.io
Netkiller Free ebook - 免费电子书
Stars: ✭ 861 (+7727.27%)
Mutual labels:  openssl

KeyGen

Build Status GitHub release License C

KeyGen is a generator for keys and passwords. It's usable as standalone application and library.

The cryptography behind is provided by OpenSSL.

Requirements

Building

Building the library and application:

mkdir build
cd build
cmake ..
make

Furthermore there are build targets either application or library. Run make <Target> to build them.

Testing

After building, the tests are executed within the build directory using:

ctest

or running make with one of these targets:

make < target >
test Runs ctest (same as ctest)
unittest Builds and runs all test
coverage Coverage (requires lcov)

Usage

The unit of length are (ascii-) characters (1 char = 1 byte). So a length of 20 means 20 (ascii-) char's = 20 Byte.

Application

The application is used with commandline arguments. Run keygen -h to print the help.

Arguments:

 Usage: keygen [Options]

  --ascii   -a :  Generates a key of ASCII characters, ranging from '!' to'~' (default)
  --ascii-blank -w :  Generates a key of ASCII characters, ranging from ' ' to'~';
                      same as --ascii, but includes blanks
  --ascii-reduced   -r :  Generates a key of reduced ASCII
  --alphanum    -p :  Generates a key of alphanumeric characters
  --length <n>  -l <n> :  Generates a key of <n> bytes length
  --short   -s :  Shows only the key
  --help    -h :  Shows the help
  --version -v :  Shows version informations and license.

Note: For generating, the --length / -l parameter is always necessary.

Examples

Key of 24 length:

$ keygen -l 20

  Generated key:
----------
amZ5QiX>9Z-=4U.XP;bD
----------
  Length : 20 / 20

this is equal to keygen --ascii -l 20 and keygen -a -l 20.

The same key size, but with short (key only) output:

$ keygen -s -l 20
ZI^fD{dX<qa?uw?%'acM

Key of 4048 length, stored in a file:

$ keygen --short --length 4048 > example.key

(Use --short / -s to write key only)

Library

const int KEY_LENGTH = 100000; // Key length
uint8_t* buffer = malloc(KEY_LENGTH * sizeof(uint8_t)); // allocate buffer

if( buffer == NULL )
{
    // Error - malloc() failed
}
else
{
    KeyGenError err = keygen_createKey(buffer, KEY_LENGTH, ASCII);

    if( err == KG_ERR_SUCCESS )
    {
        // Key generated, do something
    }
    else
    {
        // Error - handle that case
    }

    // Finally clean and free the buffer
    keygen_cleanAndFreeBuffer(buffer, length);
}

Notes

  • The keylength is set to a minimum of 8 - lesser length is not allowed
  • Using parameter -s / --short will reduce the output to key only

Documentation

License

GNU General Public License (GPL)

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].