Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: pass TokenType context to decrypt wrapped keyshare
  • Loading branch information
nimish-ks committed Oct 29, 2024
commit 7258b84ade6ac091e9ecd6c6bc0e17725e1be07e
4 changes: 2 additions & 2 deletions phase/crypto/crypto.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,9 @@ func DecryptSecret(secret map[string]interface{}, privateKeyHex, publicKeyHex st
}

// Decrypt decrypts the provided ciphertext using the Phase encryption mechanism.
func DecryptWrappedKeyShare(Keyshare1 string, Keyshare0 string, AppToken string, Keyshare1UnwrapKey string, PssUserPublicKey string, Host string) (string, error) {
func DecryptWrappedKeyShare(Keyshare1 string, Keyshare0 string, TokenType string, AppToken string, Keyshare1UnwrapKey string, PssUserPublicKey string, Host string) (string, error) {
// Fetch the wrapped key share using the app token and host
wrappedKeyShare, err := network.FetchAppKey(AppToken, Host)
wrappedKeyShare, err := network.FetchAppKey(TokenType, AppToken, Host)
if err != nil {
log.Fatalf("Failed to fetch wrapped key share: %v", err)
return "", err
Expand Down