/tongsuo-go-sdk

Primary LanguageGoApache License 2.0Apache-2.0

tongsuo-go-sdk

Tongsuo bindings for Go.

quick start

Install Tongsuo

tongsuo-go-sdk is based on Tongsuo, so we must install Tongsuo firstly. Build and install Tongsuo from source code is as follows:

git clone https://github.com/Tongsuo-Project/Tongsuo.git
cd Tongsuo

git checkout 8.3-stable

./config --prefix=/opt/tongsuo --libdir=/opt/tongsuo/lib enable-ntls
make -j
make install

Test tongsuo-go-sdk

On Linux:

LD_LIBRARY_PATH=/opt/tongsuo/lib go test ./...

On MacOS:

DYLD_LIBRARY_PATH=/opt/tongsuo/lib go test ./...

Run example

On Linux:

cd examples/sm4
go build
LD_LIBRARY_PATH=/opt/tongsuo/lib ./sm4

On MacOS:

cd examples/sm4
go build
DYLD_LIBRARY_PATH=/opt/tongsuo/lib ./sm4