Skip to content
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

hex encoded signature changed to base64 #96

Merged
merged 5 commits into from Jan 12, 2018

Conversation

Projects
None yet
2 participants
@zolia
Copy link
Member

commented Jan 11, 2018

No description provided.

func (signature *Signature) Base64() string {
return base64.StdEncoding.EncodeToString(signature.Bytes())
// SignatureBase64Decode decodes base64 string signature into raw bytes format
func SignatureBase64Decode(signature string) Signature {

This comment has been minimized.

Copy link
@Waldz

Waldz Jan 11, 2018

Member

It's factory, so name should be SignatureBase64

@@ -46,7 +46,7 @@ func newSignedPostRequest(path string, requestBody interface{}, signer identity.
return nil, err
}

req.Header.Add(authenticationHeaderName, authenticationSchemaName+" "+signature.Base64())
req.Header.Add(authenticationHeaderName, authenticationSchemaName+" "+signature.Base64Encode())

This comment has been minimized.

Copy link
@Waldz

Waldz Jan 11, 2018

Member

Should header name be repeated 2 times?

This comment has been minimized.

Copy link
@Waldz

Waldz Jan 12, 2018

Member

My mistake

func (signature *Signature) Bytes() []byte {
return signature.raw
}

// EqualsTo compares current signature with a given one

This comment has been minimized.

Copy link
@Waldz

Waldz Jan 11, 2018

Member

You could connect this function to VerifierFake

@Waldz

Waldz approved these changes Jan 12, 2018

@@ -46,7 +46,7 @@ func newSignedPostRequest(path string, requestBody interface{}, signer identity.
return nil, err
}

req.Header.Add(authenticationHeaderName, authenticationSchemaName+" "+signature.Base64())
req.Header.Add(authenticationHeaderName, authenticationSchemaName+" "+signature.Base64Encode())

This comment has been minimized.

Copy link
@Waldz

Waldz Jan 12, 2018

Member

My mistake

@Waldz Waldz merged commit a0de816 into master Jan 12, 2018

@Waldz Waldz deleted the feature/MYST-227-signature-base64 branch Jan 12, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.