# dkms-go **Repository Path**: talk-lucky/dkms-go ## Basic Information - **Project Name**: dkms-go - **Description**: The Aliyun dkms sdk for Golang. - Encrypt - Decrypt - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-03-22 - **Last Updated**: 2022-07-12 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## 项目简介 阿里云 DKMS sdk for Golang. ## 示例 ```go client := &dkms.Client{ Protocol: "HTTPS", Endpoint: "", AccessKeyID: "", AccessKeySecret: "", Password: "", Cainfo: "", UserAgent: "", RequestTimeOut: 60 * time.Second, RetryTimeOut: 60 * time.Second, } decryptResp := client.Decrypt(&DecryptRequest{ CiphertextBlob: []byte(""), Iv: []byte(""), }) println("原文: " + descyptResp.Plaintext) encryptResp := client.Encrypt(&EncryptRequest{ KeyId: "", Plaintext: []byte("") }) println("密文: " + encryptResp.CiphertextBlob) println("偏移量: " + encryptResp.Iv) ``` ## TIPS `protobuf` 结构定义在 `api.proto` 中。 生成 `api.pb.go` 的命令: ```bash protoc --go_out=../ api.proto ```