Skip to content

Commit

Permalink
remove extra hex encoding for key import
Browse files Browse the repository at this point in the history
  • Loading branch information
Olivia Thet committed Mar 12, 2024
1 parent 84d4347 commit 3892450
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/cmd/turnkey/pkg/encrypt.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package pkg

import (
"encoding/hex"
"encoding/json"

"github.com/rotisserie/eris"
Expand Down Expand Up @@ -79,12 +78,7 @@ var encryptCmd = &cobra.Command{
OutputError(err)
}

var plaintextBytes []byte
plaintextBytes, err = hex.DecodeString(plaintext)
if err != nil {
plaintextBytes = []byte(plaintext)
}
clientSendMsg, err := encryptClient.Encrypt(plaintextBytes, serverTargetMsg)
clientSendMsg, err := encryptClient.Encrypt([]byte(plaintext), serverTargetMsg)
if err != nil {
OutputError(err)
}
Expand Down

0 comments on commit 3892450

Please sign in to comment.