Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Small C++ cryptography library based on Qt and OpenSSL.

License

NotificationsYou must be signed in to change notification settings

n1flh31mur/QSimpleCrypto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Small C++ cryptographic library based onQt andOpenSSL.

This library also working withAndroid.

Dependencies

This library requires no special dependencies except ofQt with theOpenSSL (version 1.1.1 or later).

AES Block Sizes

AES-128, AES-192, AES-256

AES Ciphers

  • Electronic codebook (ECB)
  • Cipher block chaining (CBC)
  • Cipher feedback (CFB)
  • Output Feedback (OFB)
  • Counter Mode (CTR)
  • Galois/Counter Mode (GCM)
  • Counter with Cipher Block Chaining-Message Authentication Code (CCM)

Cryptosystems

Certificates

Build

Before building lib, you have to addOpenSSL lib to root folder or change path in.pro file.

cd <projectDirecoty>qmake QSimpleCrypto.pro make

How to use

To get started, you need to addOpenSSL library to your project.

You can downloadOpenSSL on:

  • Qt Maintenance Tool (downloaded files will be inQt/Tools/ folder)
  • OpenSSL site.

After building library and linkingOpenSSL, you need to linkQSimpleCrypto to your project.

Example:

#include<QDebug>#include<QByteArray>#include"QAEAD.h"intmain() {    QByteArray key ="AABBCCEEFFGGHHKKLLMMNNOOPPRRSSTT";    QByteArray iv ="AABBCCEEFFGGHHKKLLMMNNOOPPRRSSTT";    QByteArray aad ="AABBCCDDEEFF";    QByteArray tag ="AABBCCDDEEFF";    QSimpleCrypto::QAead aead;    QByteArray encrypted = aead.encryptAesGcm("Hello World", key, iv, &tag, aad);    QByteArray decrypted = aead.decryptAesGcm(bytes, key, iv, &tag, aad);    }

Note: encryption and decryption functions returns value in hex dimension. So, if you want to display encrypted or decrypted value you shouldconvert ordeconvert received value.

More information you can find onwiki.

About

Small C++ cryptography library based on Qt and OpenSSL.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

[8]ページ先頭

©2009-2025 Movatter.jp