unfortunately the documentation is lacking
I have the following example using go
// makeHmac:
// non-exportable helper to do SHA256 HMAC
func makeHmac(data string, key string) string {
byteKey, _ := hex.DecodeString(key)
byteData := []byte(data)
sig := hmac.New(sha256.New, byteKey)
sig.Write([]byte(byteData))
return base64.StdEncoding.EncodeToString(sig.Sum(nil))
}
still none the wiser though!
I do know that the app key provided should be treated as 32 2 byte values and not 64 1 byte values
Its this handling of the 32 2 byte values I am unsure of
thanks again for responding, its driving me slightly mad
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.