From a740d4ce54964e018ad688855599e795261dd0f1 Mon Sep 17 00:00:00 2001 From: Jonathan Bernard Date: Sat, 25 Dec 2021 18:58:44 -0600 Subject: [PATCH] Make the encoding utils public. --- src/main/jwt_full/claims.nim | 3 ++- src/main/jwt_full/{private => }/encoding.nim | 0 src/main/jwt_full/joseheader.nim | 3 +-- src/main/jwt_full/jws.nim | 2 +- src/main/jwt_full/private/crypto/ecdsa.nim | 3 +-- src/main/jwt_full/private/crypto/hmac.nim | 3 +-- src/main/jwt_full/private/crypto/rsa.nim | 3 +-- 7 files changed, 7 insertions(+), 10 deletions(-) rename src/main/jwt_full/{private => }/encoding.nim (100%) diff --git a/src/main/jwt_full/claims.nim b/src/main/jwt_full/claims.nim index 0570486..f08bf5a 100644 --- a/src/main/jwt_full/claims.nim +++ b/src/main/jwt_full/claims.nim @@ -16,7 +16,8 @@ import std/json, std/options, std/times -import ./private/encoding +import ./encoding + import ./private/jsonutils import ./private/timeutils diff --git a/src/main/jwt_full/private/encoding.nim b/src/main/jwt_full/encoding.nim similarity index 100% rename from src/main/jwt_full/private/encoding.nim rename to src/main/jwt_full/encoding.nim diff --git a/src/main/jwt_full/joseheader.nim b/src/main/jwt_full/joseheader.nim index 7a5c99f..90054de 100644 --- a/src/main/jwt_full/joseheader.nim +++ b/src/main/jwt_full/joseheader.nim @@ -16,8 +16,7 @@ import std/json, std/options, std/sequtils, std/strutils -import ./jwa, ./jwk -import ./private/encoding +import ./encoding, ./jwa, ./jwk import ./private/jsonutils type diff --git a/src/main/jwt_full/jws.nim b/src/main/jwt_full/jws.nim index 1268d74..f0a144e 100644 --- a/src/main/jwt_full/jws.nim +++ b/src/main/jwt_full/jws.nim @@ -13,10 +13,10 @@ import std/json, std/logging, std/options, std/sequtils, std/strutils import ./private/crypto -import ./private/encoding import ./private/jsonutils import ./claims +import ./encoding import ./joseheader import ./jwa import ./jwk diff --git a/src/main/jwt_full/private/crypto/ecdsa.nim b/src/main/jwt_full/private/crypto/ecdsa.nim index 7b10c38..13dc9cb 100644 --- a/src/main/jwt_full/private/crypto/ecdsa.nim +++ b/src/main/jwt_full/private/crypto/ecdsa.nim @@ -1,11 +1,10 @@ import std/tables import bearssl, bearssl_pkey_decoder +import ../../encoding import ../../jwa import ../../jwk -import ../encoding - import ./hash import ./pem diff --git a/src/main/jwt_full/private/crypto/hmac.nim b/src/main/jwt_full/private/crypto/hmac.nim index aca267d..706b3f7 100644 --- a/src/main/jwt_full/private/crypto/hmac.nim +++ b/src/main/jwt_full/private/crypto/hmac.nim @@ -2,11 +2,10 @@ import std/logging import bearssl +import ../../encoding import ../../jwa import ../../jwk -import ../encoding - proc bearHMAC(message: string, alg: JwtAlgorithm, key: string): string = var vtable: ptr HashClass diff --git a/src/main/jwt_full/private/crypto/rsa.nim b/src/main/jwt_full/private/crypto/rsa.nim index 104cae8..d49053f 100644 --- a/src/main/jwt_full/private/crypto/rsa.nim +++ b/src/main/jwt_full/private/crypto/rsa.nim @@ -1,11 +1,10 @@ import std/options, std/tables import bearssl, bearssl_pkey_decoder +import ../../encoding import ../../jwa import ../../jwk -import ../encoding - import ./hash import ./pem