diff --git a/src/Microsoft.AspNet.WebSockets.Protocol/HandshakeHelpers.cs b/src/Microsoft.AspNet.WebSockets.Protocol/HandshakeHelpers.cs
index 15998f2afd..b3aa119609 100644
--- a/src/Microsoft.AspNet.WebSockets.Protocol/HandshakeHelpers.cs
+++ b/src/Microsoft.AspNet.WebSockets.Protocol/HandshakeHelpers.cs
@@ -5,6 +5,7 @@ using System;
using System.Collections.Generic;
using System.Security.Cryptography;
using System.Text;
+using Microsoft.Framework.Internal;
namespace Microsoft.AspNet.WebSockets.Protocol
{
@@ -123,13 +124,8 @@ namespace Microsoft.AspNet.WebSockets.Protocol
///
///
///
- public static string CreateResponseKey(string requestKey)
+ public static string CreateResponseKey([NotNull] string requestKey)
{
- if (string.IsNullOrWhiteSpace(requestKey))
- {
- throw new ArgumentNullException("requestKey");
- }
-
using (var algorithm = SHA1.Create())
{
string merged = requestKey + "258EAFA5-E914-47DA-95CA-C5AB0DC85B11";
diff --git a/src/Microsoft.AspNet.WebSockets.Protocol/project.json b/src/Microsoft.AspNet.WebSockets.Protocol/project.json
index b525974346..a0fce33e1d 100644
--- a/src/Microsoft.AspNet.WebSockets.Protocol/project.json
+++ b/src/Microsoft.AspNet.WebSockets.Protocol/project.json
@@ -1,6 +1,9 @@
{
"version": "1.0.0-*",
"description": "Managed web socket protocol parser.",
+ "dependencies": {
+ "Microsoft.Framework.NotNullAttribute.Internal": { "type": "build", "version": "1.0.0-*" }
+ },
"frameworks": {
"net45": { },
"dnxcore50": {
diff --git a/test/Microsoft.AspNet.WebSockets.Protocol.Test/BufferStream.cs b/test/Microsoft.AspNet.WebSockets.Protocol.Test/BufferStream.cs
index ca1c1c969f..e2ff11e792 100644
--- a/test/Microsoft.AspNet.WebSockets.Protocol.Test/BufferStream.cs
+++ b/test/Microsoft.AspNet.WebSockets.Protocol.Test/BufferStream.cs
@@ -7,6 +7,7 @@ using System.Diagnostics.Contracts;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
+using Microsoft.Framework.Internal;
namespace Microsoft.AspNet.WebSockets.Protocol.Test
{
@@ -255,12 +256,8 @@ namespace Microsoft.AspNet.WebSockets.Protocol.Test
return Task.FromResult