Retired

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!'

Fundamentals
Arrays
Data Types
Cryptography
Security

Stats:

CreatedAug 1, 2017
Warriors Trained16
Total Skips0
Total Code Submissions36
Total Times Completed4
JavaScript Completions4
Total Stars2
% of votes with a positive feedback rating38% of 4
Total "Very Satisfied" Votes1
Total "Somewhat Satisfied" Votes1
Total "Not Satisfied" Votes2
Total Rank Assessments2
Average Assessed Rank
4 kyu
Highest Assessed Rank
3 kyu
Lowest Assessed Rank
6 kyu
Ad
Contributors
  • Alex1100 Avatar
Ad