Want an Autograph? (retired)
Description:
Find the most common Data Type and it's count within a given array. Once found, use that to return a hmac-sha256 signature.
HMACS: https://en.wikipedia.org/wiki/Hash-based_message_authentication_code
To return the Signature the Node.js crypto
library has been loaded.
For Example, ['1', '2', 2]
should result in ['string', 2]
. Also, this ['string', 2]
is going to be your secret for the HMAC.
The secret needs to be converted to a Buffer than base64 encoded, so ['string', 2]
should be "c3RyaW5nLDI="
Once the key is generated the HMAC could be created and once signed should return "hEenLdJWcXmEjh1pAm1hGXJtJ3cLet09ePiybBzht1M="
.
Note, The secret/key needs to be base64 encoded but when making the signature the key does not need to be base64 encoded. However, the digest needs to be in base64 encoding.
If there are any ties, then just return 'We got a tie!'
Similar Kata:
Stats:
Created | Aug 1, 2017 |
Warriors Trained | 16 |
Total Skips | 0 |
Total Code Submissions | 36 |
Total Times Completed | 4 |
JavaScript Completions | 4 |
Total Stars | 2 |
% of votes with a positive feedback rating | 38% of 4 |
Total "Very Satisfied" Votes | 1 |
Total "Somewhat Satisfied" Votes | 1 |
Total "Not Satisfied" Votes | 2 |
Total Rank Assessments | 2 |
Average Assessed Rank | 4 kyu |
Highest Assessed Rank | 3 kyu |
Lowest Assessed Rank | 6 kyu |