diff options
author | Chris Rebert <github@chrisrebert.com> | 2017-01-24 02:41:14 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-24 02:41:14 +0300 |
commit | 3b70c26fa798a96238cf98e0f36194e51a7a089b (patch) | |
tree | b65549d6f6d450050c9e986fe0263796cdaa6c0c | |
parent | b9b820d8af774e1f1b73d582775cc04b8fdef301 (diff) |
For more logical organization.
HmacSha1 is used to verify the integrity and authenticity of requests from GitHub.
-rw-r--r-- | src/main/scala/com/getbootstrap/savage/crypto/HmacSha1.scala (renamed from src/main/scala/com/getbootstrap/savage/util/HmacSha1.scala) | 3 | ||||
-rw-r--r-- | src/main/scala/com/getbootstrap/savage/server/HubSignatureDirectives.scala | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/main/scala/com/getbootstrap/savage/util/HmacSha1.scala b/src/main/scala/com/getbootstrap/savage/crypto/HmacSha1.scala index 93340ac..2af880b 100644 --- a/src/main/scala/com/getbootstrap/savage/util/HmacSha1.scala +++ b/src/main/scala/com/getbootstrap/savage/crypto/HmacSha1.scala @@ -1,9 +1,10 @@ -package com.getbootstrap.savage.util +package com.getbootstrap.savage.crypto import javax.crypto.Mac import javax.crypto.spec.SecretKeySpec import java.security.{NoSuchAlgorithmException, InvalidKeyException, SignatureException} import java.security.MessageDigest +import com.getbootstrap.savage.util.HexByteArray object HmacSha1 { private val HmacSha1Algorithm = "HmacSHA1" diff --git a/src/main/scala/com/getbootstrap/savage/server/HubSignatureDirectives.scala b/src/main/scala/com/getbootstrap/savage/server/HubSignatureDirectives.scala index a0d4153..0308757 100644 --- a/src/main/scala/com/getbootstrap/savage/server/HubSignatureDirectives.scala +++ b/src/main/scala/com/getbootstrap/savage/server/HubSignatureDirectives.scala @@ -3,7 +3,8 @@ package com.getbootstrap.savage.server import scala.util.{Try,Success,Failure} import spray.routing.{Directive1, MalformedHeaderRejection, MalformedRequestContentRejection, ValidationRejection} import spray.routing.directives.{BasicDirectives, HeaderDirectives, RouteDirectives, MarshallingDirectives} -import com.getbootstrap.savage.util.{HmacSha1,Utf8ByteArray} +import com.getbootstrap.savage.crypto.HmacSha1 +import com.getbootstrap.savage.util.Utf8ByteArray trait HubSignatureDirectives { import BasicDirectives.provide |