Skip to content

XUJINKAI/xx-crypto-cli

Repository files navigation

xx-crypto-cli

⚠️ WIP: ONLY a few commands work. 开发中!

Windows/Linux Crypto CLI Toolbox.

跨平台密码工具箱,基于GmSSL,支持国密,SDF接口。
功能:常见密码计算,常见数据格式转换,实用加密工具。
适用于密码计算和验证,以及日常加密使用。

Usage Demo

  • Generate random data from SDF lib
    xx rand -n 10k --engine sdf:lib.so --out rand.bin

  • Randomness test
    xx randcheck rand.bin

  • Generate SM2 key
    xx sm2 keygen [--sk <PrivateKeyHex>] [--pem]

  • PBKDF2 xx pbkdf2 -p 123 -n 10

Build

Run git submodule update --init to fetch the submodules.

Linux:

mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make
make test
make test-valgrind
make install

Windows:

mkdir build-win
cd build-win
cmake ..
cmake --build . --config release

Links

cmdparser

GmSSL, nist_sts

asn1js

License

Copyright 2022 XUJINKAI/xx-crypto-cli. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Releases

No releases published