diff --git a/src/Keys/AppKey.php b/src/Keys/AppKey.php index 3c092ca..5df48e0 100644 --- a/src/Keys/AppKey.php +++ b/src/Keys/AppKey.php @@ -4,6 +4,7 @@ namespace CodeLieutenant\LaravelCrypto\Keys; +use CodeLieutenant\LaravelCrypto\Traits\LaravelKeyParser; use Illuminate\Contracts\Config\Repository; class AppKey implements Loader diff --git a/src/Keys/Generators/AppKeyGenerator.php b/src/Keys/Generators/AppKeyGenerator.php index 90ea682..f97953a 100644 --- a/src/Keys/Generators/AppKeyGenerator.php +++ b/src/Keys/Generators/AppKeyGenerator.php @@ -7,7 +7,7 @@ use CodeLieutenant\LaravelCrypto\Encryption\AesGcm256Encrypter; use CodeLieutenant\LaravelCrypto\Encryption\XChaCha20Poly1305Encrypter; use CodeLieutenant\LaravelCrypto\Enums\Encryption; -use CodeLieutenant\LaravelCrypto\Keys\EnvKeySaver; +use CodeLieutenant\LaravelCrypto\Traits\EnvKeySaver; use Illuminate\Contracts\Config\Repository; use Illuminate\Encryption\Encrypter; diff --git a/src/Keys/Generators/Blake2bHashingKeyGenerator.php b/src/Keys/Generators/Blake2bHashingKeyGenerator.php index 5b178cf..bf50c14 100644 --- a/src/Keys/Generators/Blake2bHashingKeyGenerator.php +++ b/src/Keys/Generators/Blake2bHashingKeyGenerator.php @@ -4,8 +4,8 @@ namespace CodeLieutenant\LaravelCrypto\Keys\Generators; -use CodeLieutenant\LaravelCrypto\Keys\EnvKeySaver; use CodeLieutenant\LaravelCrypto\Support\Random; +use CodeLieutenant\LaravelCrypto\Traits\EnvKeySaver; use Illuminate\Contracts\Config\Repository; class Blake2bHashingKeyGenerator implements Generator diff --git a/src/Keys/EnvKeySaver.php b/src/Traits/EnvKeySaver.php similarity index 96% rename from src/Keys/EnvKeySaver.php rename to src/Traits/EnvKeySaver.php index c1c7258..74aa540 100644 --- a/src/Keys/EnvKeySaver.php +++ b/src/Traits/EnvKeySaver.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace CodeLieutenant\LaravelCrypto\Keys; +namespace CodeLieutenant\LaravelCrypto\Traits; use CodeLieutenant\LaravelCrypto\Support\Base64; use RuntimeException; diff --git a/src/Keys/LaravelKeyParser.php b/src/Traits/LaravelKeyParser.php similarity index 94% rename from src/Keys/LaravelKeyParser.php rename to src/Traits/LaravelKeyParser.php index 6abf2a0..6ed151f 100644 --- a/src/Keys/LaravelKeyParser.php +++ b/src/Traits/LaravelKeyParser.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace CodeLieutenant\LaravelCrypto\Keys; +namespace CodeLieutenant\LaravelCrypto\Traits; use CodeLieutenant\LaravelCrypto\Support\Base64; use Illuminate\Encryption\MissingAppKeyException; diff --git a/tests/Architecture/HashingTest.php b/tests/Architecture/HashingTest.php new file mode 100644 index 0000000..174d7fd --- /dev/null +++ b/tests/Architecture/HashingTest.php @@ -0,0 +1,3 @@ +expect('CodeLieutenant\LaravelCrypto\Traits') ->toBeTraits(); +arch('hashing traits') + ->expect('CodeLieutenant\LaravelCrypto\Hashing\Traits') + ->toBeTraits(); + +arch('signing traits') + ->expect('CodeLieutenant\LaravelCrypto\Signing\Traits') + ->toBeTraits(); +