Skip to content

Commit

Permalink
config --crypt null (#878)
Browse files Browse the repository at this point in the history
  • Loading branch information
ithewei committed Jun 28, 2022
1 parent 0a9243f commit c5232c2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion client/main.go
Expand Up @@ -109,7 +109,7 @@ func main() {
cli.StringFlag{
Name: "crypt",
Value: "aes",
Usage: "aes, aes-128, aes-192, salsa20, blowfish, twofish, cast5, 3des, tea, xtea, xor, sm4, none",
Usage: "aes, aes-128, aes-192, salsa20, blowfish, twofish, cast5, 3des, tea, xtea, xor, sm4, none, null",
},
cli.StringFlag{
Name: "mode",
Expand Down Expand Up @@ -340,6 +340,8 @@ func main() {
log.Println("key derivation done")
var block kcp.BlockCrypt
switch config.Crypt {
case "null":
block = nil
case "sm4":
block, _ = kcp.NewSM4BlockCrypt(pass[:16])
case "tea":
Expand Down
4 changes: 3 additions & 1 deletion server/main.go
Expand Up @@ -149,7 +149,7 @@ func main() {
cli.StringFlag{
Name: "crypt",
Value: "aes",
Usage: "aes, aes-128, aes-192, salsa20, blowfish, twofish, cast5, 3des, tea, xtea, xor, sm4, none",
Usage: "aes, aes-128, aes-192, salsa20, blowfish, twofish, cast5, 3des, tea, xtea, xor, sm4, none, null",
},
cli.StringFlag{
Name: "mode",
Expand Down Expand Up @@ -361,6 +361,8 @@ func main() {
log.Println("key derivation done")
var block kcp.BlockCrypt
switch config.Crypt {
case "null":
block = nil
case "sm4":
block, _ = kcp.NewSM4BlockCrypt(pass[:16])
case "tea":
Expand Down

0 comments on commit c5232c2

Please sign in to comment.