-
Notifications
You must be signed in to change notification settings - Fork 342
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature] support aes-128 & aes-256 encryption #668
[feature] support aes-128 & aes-256 encryption #668
Conversation
…ored in Nacos are success in test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
go.mod conflicts
@@ -19,12 +19,15 @@ package config_client | |||
import ( | |||
"context" | |||
"fmt" | |||
"github.com/alibabacloud-go/tea/tea" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import format
@@ -0,0 +1,56 @@ | |||
package encoding |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New File add open source license
common/encoding/encryption.go
Outdated
return "" | ||
} | ||
var startPos, endPos int | ||
resRunes := make([]rune, 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
slice advised to set the initial capacity to 8
common/encryption/kms_client.go
Outdated
|
||
func InitDefaultKmsV1ClientWithAccessKey(regionId, ak, sk string) (*KmsClient, error) { | ||
var rErr error | ||
if GetDefaultKmsClient() == nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if there is too much nesting, reverse is recommended
common/encryption/kms_client.go
Outdated
|
||
func (kmsClient *KmsClient) Decrypt(cipherContent string) (string, error) { | ||
request := kms.CreateDecryptRequest() | ||
request.Method = "POST" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"POST" replace http.MethodPost
No description provided.