Skip to content

Commit

Permalink
Refactor name
Browse files Browse the repository at this point in the history
  • Loading branch information
batphonghan committed Jul 5, 2023
1 parent 76728db commit ae78d16
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions testing/httptest/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ func (s *StaderHandler) presigns(w http.ResponseWriter, r *http.Request) {
decodeSig, err := crypto.DecodeBase64(v.Signature)
require.Nil(s.t, err)

byteSig, err := DecryptUsingPublicKey(decodeSig, s.privatekey)
byteSig, err := DecryptUsingPrivateKey(decodeSig, s.privatekey)
require.Nil(s.t, err)

var sig bls.Sign
Expand Down Expand Up @@ -235,7 +235,7 @@ func (s *StaderHandler) srHash(t *testing.T, request stader_backend.PreSignSendA
return srHash
}

func DecryptUsingPublicKey(data []byte, privateKey *rsa.PrivateKey) ([]byte, error) {
func DecryptUsingPrivateKey(data []byte, privateKey *rsa.PrivateKey) ([]byte, error) {
exitMsgEncrypted, err := rsa.DecryptOAEP(sha256.New(), rand.Reader, privateKey, data, nil)
if err != nil {
return nil, err
Expand Down

0 comments on commit ae78d16

Please sign in to comment.