Skip to content

Commit

Permalink
updated mine license
Browse files Browse the repository at this point in the history
  • Loading branch information
abumq committed Nov 24, 2018
1 parent cf12d82 commit 98220c3
Show file tree
Hide file tree
Showing 26 changed files with 112 additions and 95 deletions.
9 changes: 4 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ before_install:
- sudo apt-get -qq update
- sudo apt-get install -y libssl-dev libgtest-dev php5-cli valgrind
- sudo apt-get install --only-upgrade cmake
- cmake --version
- cmake --version
- g++ --version
# Crypto++ (We manually install it because we need Pem Pack as well)
- wget https://raw.githubusercontent.com/muflihun/muflihun.github.io/master/downloads/cryptocpp.tar.gz
- wget https://muflihun.github.io/downloads/cryptocpp.tar.gz
- tar xf cryptocpp.tar.gz
- cd cryptopp-CRYPTOPP_5_6_5
- wget https://raw.githubusercontent.com/muflihun/muflihun.github.io/master/downloads/pem_pack.zip
- wget https://muflihun.github.io/downloads/pem_pack.zip
- unzip pem_pack.zip
- cmake .
- make
Expand All @@ -28,7 +28,7 @@ before_install:
- sudo cp -a libgtest_main.so libgtest.so /usr/lib/
- cd ..
## Easylogging++
- wget https://github.com/muflihun/easyloggingpp/archive/master.zip
- wget https://github.com/zuhd-org/easyloggingpp/archive/master.zip
- unzip master.zip
- cd easyloggingpp-master
- cmake .
Expand All @@ -51,4 +51,3 @@ branches:
only:
- master
- develop

3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Change Log

## [1.1.5] - 24-11-2018
- License update

## [1.1.4] - 08-03-2018
### Fixes
- Fix cross-encoding with issue 11
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ option (test_main_header "Test main header (mine.h)" OFF)
option (test_wstring_conversions "Test std::wstring (wchar_t*) conversions for encodings" ON)


set (MINE_VERSION "1.1.4") ## Also update build.php
set (MINE_SOVERSION "1.1.4")
set (MINE_VERSION "1.1.5") ## Also update build.php
set (MINE_SOVERSION "1.1.5")

add_definitions (-DMINE_VERSION="${MINE_VERSION}")

Expand Down
6 changes: 3 additions & 3 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Copyright (c) 2017-present Muflihun Labs
Copyright (c) 2017-present Zuhd Web Services
Copyright (c) 2017-present @abumusamq

https://github.com/muflihun/
https://muflihun.github.io
https://github.com/zuhd-org/
https://zuhd.org
https://muflihun.com

Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
29 changes: 15 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@

Mine is fast, memory-efficient, single-header minimal cryptography implementation for small-medium projects that cannot afford to link to external libraries.

[![Build Status](https://img.shields.io/travis/muflihun/mine/master.svg)](https://travis-ci.org/muflihun/mine)
[![Build Status](https://img.shields.io/travis/muflihun/mine/develop.svg)](https://travis-ci.org/muflihun/mine)
[![Version](https://img.shields.io/github/release/muflihun/mine.svg)](https://github.com/muflihun/mine/releases/latest)
[![Build Status](https://img.shields.io/travis/zuhd-org/mine/master.svg)](https://travis-ci.org/muflihun/mine)
[![Build Status](https://img.shields.io/travis/zuhd-org/mine/develop.svg)](https://travis-ci.org/muflihun/mine)
[![Version](https://img.shields.io/github/release/muflihun/mine.svg)](https://github.com/zuhd-org/mine/releases/latest)
[![Documentation](https://img.shields.io/badge/docs-doxygen-blue.svg)](https://muflihun.github.io/mine)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/muflihun/mine/blob/master/LICENCE)
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.me/MuflihunDotCom/25)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/zuhd-org/mine/blob/master/LICENCE)

[![Donate](https://muflihun.github.io/donate.png?v2)](https://www.paypal.me/zuhd/25)

# Overview
It all started with [ripe](https://github.com/muflihun/ripe) that depends on third-party library (initially OpenSSL then Crypto++) linked statically. However after deploying [residue](https://github.com/muflihun/residue) with ripe to older distributions of linux, we learnt that portability is an issue for ripe as _minimal_ library (because of it's dependencies). So we started to implement standards forming _Mine_.
Expand All @@ -24,7 +25,7 @@ Simply copy `mine.h` and `mine.cc` from [`package/`](/package/) directory to you
Alternatively, feel free to link it as shared or static library (you will need to compile yourself)

# Installation (CLI Tool)
You can either download binary for your platform via [releases](https://github.com/muflihun/mine/releases) page or using NPM
You can either download binary for your platform via [releases](https://github.com/zuhd-org/mine/releases) page or using NPM

```
npm install -g mine-linux@latest
Expand All @@ -35,7 +36,7 @@ sudo ln -s `which mine-linux` /usr/local/bin/mine
npm install -g mine-darwin@latest
sudo ln -s `which mine-darwin` /usr/local/bin/mine
```

# Features
Mine supports following features:

Expand All @@ -44,7 +45,7 @@ Mine supports following features:
* RSA [[RFC-3447](https://tools.ietf.org/html/rfc3447)]
* AES [[FIPS Pub. 197](http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.197.pdf)]
* ZLib (Depends upon libz)

This is what we are aiming for _minimal_ crypto library.

# Notes
Expand All @@ -69,20 +70,20 @@ This is what we are aiming for _minimal_ crypto library.
* `mine::Base64::decode(encoding);`
* `mine::Base64::decode(encoding.begin(), encoding.end());`
* `mine::Base64::expectedLength(n);`

### AES

```c++
std::string random256BitKey = mine::AES::generateRandomKey(256);

mine::AES aesManager;
aesManager.encrypt(b16Input, hexKey, mine::MineCommon::Encoding::Base16, mine::MineCommon::Encoding::Base64); // takes base16, encrypts and returns base64
aesManager.encrypt(b16Input, hexKey, mine::MineCommon::Encoding::Base16, mine::MineCommon::Encoding::Base64); // takes base16, encrypts and returns base64

aesManager.setKey(random256BitKey); // now use this key
aesManager.encr(b16Input, mine::MineCommon::Encoding::Base16, mine::MineCommon::Encoding::Base64); // don't need key with requests
aesManager.decr(b64Input, mine::MineCommon::Encoding::Base64, mine::MineCommon::Encoding::Raw); // Returns raw string
```

### ZLib

* `mine::ZLib::compressString(str);`
Expand Down Expand Up @@ -115,4 +116,4 @@ See the License for the specific language governing permissions and
limitations under the License.
```

[banner]: https://raw.githubusercontent.com/muflihun/mine/develop/mine.png
[banner]: https://raw.githubusercontent.com/zuhd-org/mine/develop/mine.png
12 changes: 6 additions & 6 deletions build.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
// Mine ({{version}})
// Single header minimal cryptography library
//
// Copyright (c) 2017-present Muflihun Labs
// Copyright (c) 2017-present Zuhd Web Services
// Copyright (c) 2017-present @abumusamq
//
// This library is released under the Apache 2.0 license
// https://github.com/muflihun/mine/blob/master/LICENSE
// https://github.com/zuhd-org/mine/blob/master/LICENSE
//
// https://github.com/muflihun/mine
// https://muflihun.github.io/mine
// https://github.com/zuhd-org/mine
// https://zuhd.org
// https://muflihun.com
//
Expand Down Expand Up @@ -120,7 +120,7 @@ function resolveTemplate($template, $includes, $lines, $lib_version, $filename)

fclose($fd);
}

}
resolveTemplate($header_template, $includes, $lines, $lib_version, "package/mine.h");

Expand Down Expand Up @@ -163,6 +163,6 @@ function resolveTemplate($template, $includes, $lines, $lib_version, $filename)

fclose($fd);
}

}
resolveTemplate($source_template, $includes, $lines, $lib_version, "package/mine.cc");
8 changes: 4 additions & 4 deletions cli/mine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
//
// Mine is single header minimal cryptography library
//
// Copyright (c) 2017-2018 Muflihun Labs
// Copyright (c) 2017-present Zuhd Web Services
//
// This library is released under the Apache 2.0 license
// https://github.com/muflihun/mine/blob/master/LICENSE
// https://github.com/muflihun/zuhd-org/blob/master/LICENSE
//
// https://github.com/muflihun/mine
// https://muflihun.github.io/mine
// https://github.com/zuhd-org/mine
// https://zuhd.org
// https://muflihun.com
//

Expand Down
6 changes: 3 additions & 3 deletions dist/npm/darwin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
"name": "mine-darwin",
"version": "1.1.4",
"description": "Mine cryptography CLI tool (macOS)",
"homepage": "https://github.com/muflihun/mine",
"author": "Muflihun Labs <[email protected]>",
"homepage": "https://github.com/zuhd-org/mine",
"author": "Zuhd Web Services <[email protected]>",
"license": "Apache-2.0",
"bin": "./mine",
"repository": {
"type": "git",
"url": "http://github.com/muflihun/mine.git"
"url": "http://github.com/zuhd-org/mine.git"
},
"files": [
"mine"
Expand Down
10 changes: 5 additions & 5 deletions dist/npm/linux/package.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
{
"name": "mine-linux",
"version": "1.1.4",
"description": "Mine cryptography CLI tool (Linux)",
"homepage": "https://github.com/muflihun/mine",
"author": "Muflihun Labs <[email protected]>",
"description": "Mine cryptography CLI tool (linux)",
"homepage": "https://github.com/zuhd-org/mine",
"author": "Zuhd Web Services <[email protected]>",
"license": "Apache-2.0",
"bin": "./mine",
"repository": {
"type": "git",
"url": "http://github.com/muflihun/mine.git"
"url": "http://github.com/zuhd-org/mine.git"
},
"files": [
"mine"
],
"keywords": [
"aes",
"rsa",
"linux",
"darwin",
"crypto",
"zlib"
]
Expand Down
8 changes: 4 additions & 4 deletions package/mine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
// Mine (1.1.4)
// Single header minimal cryptography library
//
// Copyright (c) 2017-present Muflihun Labs
// Copyright (c) 2017-present Zuhd Web Services
// Copyright (c) 2017-present @abumusamq
//
// This library is released under the Apache 2.0 license
// https://github.com/muflihun/mine/blob/master/LICENSE
// https://github.com/muflihun/zuhd-org/blob/master/LICENSE
//
// https://github.com/muflihun/mine
// https://muflihun.github.io/mine
// https://github.com/zuhd-org/mine
// https://zuhd.org
// https://muflihun.com
//
#include <algorithm>
Expand Down
8 changes: 4 additions & 4 deletions package/mine.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
// Mine (1.1.4)
// Single header minimal cryptography library
//
// Copyright (c) 2017-present Muflihun Labs
// Copyright (c) 2017-present Zuhd Web Services
// Copyright (c) 2017-present @abumusamq
//
// This library is released under the Apache 2.0 license
// https://github.com/muflihun/mine/blob/master/LICENSE
// https://github.com/muflihun/zuhd-org/blob/master/LICENSE
//
// https://github.com/muflihun/mine
// https://muflihun.github.io/mine
// https://github.com/zuhd-org/mine
// https://zuhd.org
// https://muflihun.com
//

Expand Down
7 changes: 4 additions & 3 deletions src/aes.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@
// instead which is automatically generated and includes this file
// This is seperated to aid the development
//
// Copyright (c) 2017-2018 Muflihun Labs
// Copyright (c) 2017-present Zuhd Web Services
//
// This library is released under the Apache 2.0 license
// https://github.com/muflihun/mine/blob/master/LICENSE
// https://github.com/zuhd-org/mine/blob/master/LICENSE
//
// https://github.com/muflihun/mine
// https://github.com/zuhd-org/mine
// https://zuhd.org
//
//
// Standard publication
Expand Down
7 changes: 4 additions & 3 deletions src/aes.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@
// instead which is automatically generated and includes this file
// This is seperated to aid the development
//
// Copyright (c) 2017-2018 Muflihun Labs
// Copyright (c) 2017-present Zuhd Web Services
//
// This library is released under the Apache 2.0 license
// https://github.com/muflihun/mine/blob/master/LICENSE
// https://github.com/zuhd-org/mine/blob/master/LICENSE
//
// https://github.com/muflihun/mine
// https://github.com/zuhd-org/mine
// https://zuhd.org
//

#ifdef MINE_CRYPTO_H
Expand Down
7 changes: 4 additions & 3 deletions src/base16.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@
// instead which is automatically generated and includes this file
// This is seperated to aid the development
//
// Copyright (c) 2017-2018 Muflihun Labs
// Copyright (c) 2017-present Zuhd Web Services
//
// This library is released under the Apache 2.0 license
// https://github.com/muflihun/mine/blob/master/LICENSE
// https://github.com/zuhd-org/mine/blob/master/LICENSE
//
// https://github.com/muflihun/mine
// https://github.com/zuhd-org/mine
// https://zuhd.org
//

#include <sstream>
Expand Down
7 changes: 4 additions & 3 deletions src/base16.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@
// instead which is automatically generated and includes this file
// This is seperated to aid the development
//
// Copyright (c) 2017-2018 Muflihun Labs
// Copyright (c) 2017-present Zuhd Web Services
//
// This library is released under the Apache 2.0 license
// https://github.com/muflihun/mine/blob/master/LICENSE
// https://github.com/zuhd-org/mine/blob/master/LICENSE
//
// https://github.com/muflihun/mine
// https://github.com/zuhd-org/mine
// https://zuhd.org
//

#ifdef MINE_CRYPTO_H
Expand Down
7 changes: 4 additions & 3 deletions src/base64.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@
// instead which is automatically generated and includes this file
// This is seperated to aid the development
//
// Copyright (c) 2017-2018 Muflihun Labs
// Copyright (c) 2017-present Zuhd Web Services
//
// This library is released under the Apache 2.0 license
// https://github.com/muflihun/mine/blob/master/LICENSE
// https://github.com/zuhd-org/mine/blob/master/LICENSE
//
// https://github.com/muflihun/mine
// https://github.com/zuhd-org/mine
// https://zuhd.org
//

#include <sstream>
Expand Down
7 changes: 4 additions & 3 deletions src/base64.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@
// instead which is automatically generated and includes this file
// This is seperated to aid the development
//
// Copyright (c) 2017-2018 Muflihun Labs
// Copyright (c) 2017-present Zuhd Web Services
//
// This library is released under the Apache 2.0 license
// https://github.com/muflihun/mine/blob/master/LICENSE
// https://github.com/zuhd-org/mine/blob/master/LICENSE
//
// https://github.com/muflihun/mine
// https://github.com/zuhd-org/mine
// https://zuhd.org
//

#ifdef MINE_CRYPTO_H
Expand Down
7 changes: 4 additions & 3 deletions src/big-integer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@
// instead which is automatically generated and includes this file
// This is seperated to aid the development
//
// Copyright (c) 2017-2018 Muflihun Labs
// Copyright (c) 2017-present Zuhd Web Services
//
// This library is released under the Apache 2.0 license
// https://github.com/muflihun/mine/blob/master/LICENSE
// https://github.com/zuhd-org/mine/blob/master/LICENSE
//
// https://github.com/muflihun/mine
// https://github.com/zuhd-org/mine
// https://zuhd.org
//
#include <iostream>
#include <sstream>
Expand Down
Loading

0 comments on commit 98220c3

Please sign in to comment.