Skip to content

Commit 6c371e4

Browse files
committed
Remove Array.Resize (#3)
1 parent cdd74e3 commit 6c371e4

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

Lib.Net.Http.WebPush/PushServiceClient.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ public class PushServiceClient
3737

3838
private const string KEYING_MATERIAL_INFO_PARAMETER_PREFIX = "WebPush: info";
3939
private const byte KEYING_MATERIAL_INFO_PARAMETER_DELIMITER = 1;
40-
private const int KEYING_MATERIAL_INFO_PARAMETER_LENGTH = 32;
4140

4241
private const int CONTENT_RECORD_SIZE = 4096;
4342

@@ -285,9 +284,7 @@ private static byte[] GetKeyingMaterial(PushSubscription subscription, Asymmetri
285284
byte[] sharedSecret = ecdhAgreement.CalculateAgreement(ECKeyHelper.GetECPublicKeyParameters(userAgentPublicKey)).ToByteArrayUnsigned();
286285
byte[] sharedSecretHash = HmacSha256(authenticationSecret, sharedSecret);
287286
byte[] infoParameter = GetKeyingMaterialInfoParameter(userAgentPublicKey, applicationServerPublicKey);
288-
289287
byte[] keyingMaterial = HmacSha256(sharedSecretHash, infoParameter);
290-
Array.Resize(ref keyingMaterial, KEYING_MATERIAL_INFO_PARAMETER_LENGTH);
291288

292289
return keyingMaterial;
293290
}

0 commit comments

Comments
 (0)