Giter Club home page Giter Club logo

crypto_sm's Introduction

crypto_sm

CITA-Cloudcrypto微服务的实现,采用国密签名算法(sm2)和哈希算法(sm3)组合。

编译docker镜像

docker build -t citacloud/crypto_sm .

使用方法

$ crypto -h
crypto 6.6.5
Rivtower Technologies <[email protected]>

Usage: crypto <COMMAND>

Commands:
  run   run this service
  help  Print this message or the help of the given subcommand(s)

Options:
  -h, --help     Print help
  -V, --version  Print version

crypto-run

运行crypto服务。

$ crypto run -h
run this service

Usage: crypto run [OPTIONS]

Options:
  -c, --config <CONFIG_PATH>                 Chain config path [default: config.toml]
  -p, --private_key_path <PRIVATE_KEY_PATH>  private key path [default: private_key]
  -h, --help                                 Print help

参数:

  1. 微服务配置文件。

    参见示例example/config.toml

    其中[crypto_sm]段为微服务的配置:

    • crypto_port 为该服务监听的端口号。
    • domain 节点的域名

    其中[crypto_sm.log_config]段为微服务日志的配置:

    • max_level 日志等级
    • filter 日志过滤配置
    • service_name 服务名称,用作日志文件名与日志采集的服务名称
    • rolling_file_path 日志文件路径
    • agent_endpoint jaeger 采集端地址
  2. 私钥文件路径。 文件内容参见示例example/private_key

$ crypto run -c example/config.toml -p example/private_key
2023-02-09T02:33:39.049396Z  INFO crypto: grpc port of crypto_sm: 60005
2023-02-09T02:33:39.049974Z  INFO crypto: start crypto_sm grpc server

设计

只是对签名算法(sm2)和哈希算法(sm3)的简单封装。

crypto_sm's People

Contributors

rink1969 avatar jayanring avatar pencil-yao avatar jlerxky avatar naughtydogofschrodinger avatar acechef avatar

Stargazers

曾涛 avatar

Watchers

 avatar  avatar 曾涛 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.