private string GetSignature(Track track, string salt) { // https://en.wikipedia.org/wiki/Hash-based_message_authentication_code throw new NotImplementedException("Implement HMAC-SHA1!"); var songIdEncoded = Encoding.UTF8.GetBytes(track.StoreId); var saltEncoded = Encoding.UTF8.GetBytes(salt); var hmacKey = Encoding.UTF8.GetBytes(Key); var data = DataTypeUtils.CombineBytes(songIdEncoded, saltEncoded); var hmac = WinRTCrypto.HashAlgorithmProvider.OpenAlgorithm(HashAlgorithm.Sha1); var sig = DataTypeUtils.ToUrlSafeBase64(hmac.HashData(data)); return(sig); }