Skip to content

Commit

Permalink
Guard against duplicate class errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
paragonie-security committed Apr 21, 2017
1 parent b87e1e0 commit fc1f09e
Show file tree
Hide file tree
Showing 26 changed files with 1,835 additions and 1,733 deletions.
3,468 changes: 1,735 additions & 1,733 deletions src/Compat.php

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions src/Core/BLAKE2b.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?php

if (class_exists('ParagonIE_Sodium_Core_BLAKE2b', false)) {
return;
}

/**
* Class ParagonIE_Sodium_Core_BLAKE2b
*
Expand Down
4 changes: 4 additions & 0 deletions src/Core/ChaCha20.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?php

if (class_exists('ParagonIE_Sodium_Core_ChaCha20', false)) {
return;
}

/**
* Class ParagonIE_Sodium_Core_ChaCha20
*/
Expand Down
4 changes: 4 additions & 0 deletions src/Core/ChaCha20/Ctx.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?php

if (class_exists('ParagonIE_Sodium_Core_ChaCha20_Ctx', false)) {
return;
}

/**
* Class ParagonIE_Sodium_Core_ChaCha20_Ctx
*/
Expand Down
4 changes: 4 additions & 0 deletions src/Core/ChaCha20/IetfCtx.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?php

if (class_exists('ParagonIE_Sodium_Core_ChaCha20_IetfCtx', false)) {
return;
}

/**
* Class ParagonIE_Sodium_Core_ChaCha20_IetfCtx
*/
Expand Down
4 changes: 4 additions & 0 deletions src/Core/Curve25519.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?php

if (class_exists('ParagonIE_Sodium_Core_Curve25519', false)) {
return;
}

/**
* Class ParagonIE_Sodium_Core_Curve25519
*
Expand Down
4 changes: 4 additions & 0 deletions src/Core/Curve25519/Fe.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?php

if (class_exists('ParagonIE_Sodium_Core_Curve25519_Fe', false)) {
return;
}

/**
* Class ParagonIE_Sodium_Core_Curve25519_Fe
*
Expand Down
4 changes: 4 additions & 0 deletions src/Core/Curve25519/Ge/Cached.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?php


if (class_exists('ParagonIE_Sodium_Core_Curve25519_Ge_Cached', false)) {
return;
}
/**
* Class ParagonIE_Sodium_Core_Curve25519_Ge_Cached
*/
Expand Down
3 changes: 3 additions & 0 deletions src/Core/Curve25519/Ge/P1p1.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<?php

if (class_exists('ParagonIE_Sodium_Core_Curve25519_Ge_P1p1', false)) {
return;
}
/**
* Class ParagonIE_Sodium_Core_Curve25519_Ge_P1p1
*/
Expand Down
4 changes: 4 additions & 0 deletions src/Core/Curve25519/Ge/P2.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?php

if (class_exists('ParagonIE_Sodium_Core_Curve25519_Ge_P2', false)) {
return;
}

/**
* Class ParagonIE_Sodium_Core_Curve25519_Ge_P2
*/
Expand Down
4 changes: 4 additions & 0 deletions src/Core/Curve25519/Ge/P3.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?php

if (class_exists('ParagonIE_Sodium_Core_Curve25519_Ge_P3', false)) {
return;
}

/**
* Class ParagonIE_Sodium_Core_Curve25519_Ge_P3
*/
Expand Down
4 changes: 4 additions & 0 deletions src/Core/Curve25519/Ge/Precomp.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?php

if (class_exists('ParagonIE_Sodium_Core_Curve25519_Ge_Precomp', false)) {
return;
}

/**
* Class ParagonIE_Sodium_Core_Curve25519_Ge_Precomp
*/
Expand Down
4 changes: 4 additions & 0 deletions src/Core/Curve25519/H.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?php

if (class_exists('ParagonIE_Sodium_Core_Curve25519_H', false)) {
return;
}

/**
* Class ParagonIE_Sodium_Core_Curve25519_H
*
Expand Down
4 changes: 4 additions & 0 deletions src/Core/Ed25519.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?php

if (class_exists('ParagonIE_Sodium_Core_Ed25519', false)) {
return;
}

/**
* Class ParagonIE_Sodium_Core_Ed25519
*/
Expand Down
4 changes: 4 additions & 0 deletions src/Core/HChaCha20.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?php

if (class_exists('ParagonIE_Sodium_Core_HChaCha20', false)) {
return;
}

/**
* Class ParagonIE_Sodium_Core_HChaCha20
*/
Expand Down
4 changes: 4 additions & 0 deletions src/Core/HSalsa20.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?php

if (class_exists('ParagonIE_Sodium_Core_HSalsa20', false)) {
return;
}

/**
* Class ParagonIE_Sodium_Core_HSalsa20
*/
Expand Down
4 changes: 4 additions & 0 deletions src/Core/Poly1305.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?php

if (class_exists('ParagonIE_Sodium_Core_Poly1305', false)) {
return;
}

/**
* Class ParagonIE_Sodium_Core_Poly1305
*/
Expand Down
4 changes: 4 additions & 0 deletions src/Core/Poly1305/State.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?php

if (class_exists('ParagonIE_Sodium_Core_Poly1305_State', false)) {
return;
}

/**
* Class ParagonIE_Sodium_Core_Poly1305_State
*/
Expand Down
4 changes: 4 additions & 0 deletions src/Core/Salsa20.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?php

if (class_exists('ParagonIE_Sodium_Core_Salsa20', false)) {
return;
}

/**
* Class ParagonIE_Sodium_Core_Salsa20
*/
Expand Down
4 changes: 4 additions & 0 deletions src/Core/SipHash.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?php

if (class_exists('ParagonIE_Sodium_Core_SipHash', false)) {
return;
}

/**
* Class ParagonIE_SodiumCompat_Core_SipHash
*
Expand Down
4 changes: 4 additions & 0 deletions src/Core/Util.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?php

if (class_exists('ParagonIE_Sodium_Core_Util', false)) {
return;
}

/**
* Class ParagonIE_Sodium_Core_Util
*/
Expand Down
4 changes: 4 additions & 0 deletions src/Core/X25519.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?php

if (class_exists('ParagonIE_Sodium_Core_X25519', false)) {
return;
}

/**
* Class ParagonIE_Sodium_Core_X25519
*/
Expand Down
4 changes: 4 additions & 0 deletions src/Core/XChaCha20.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?php

if (class_exists('ParagonIE_Sodium_Core_XChaCha20', false)) {
return;
}

/**
* Class ParagonIE_Sodium_Core_XChaCha20
*/
Expand Down
5 changes: 5 additions & 0 deletions src/Core/Xsalsa20.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<?php


if (class_exists('ParagonIE_Sodium_Core_Xsalsa20', false)) {
return;
}

/**
* Class ParagonIE_Sodium_Core_Xsalsa20
*/
Expand Down
4 changes: 4 additions & 0 deletions src/Crypto.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?php

if (class_exists('ParagonIE_Sodium_Crypto', false)) {
return;
}

/**
* Class ParagonIE_Sodium_Crypto
*
Expand Down
4 changes: 4 additions & 0 deletions src/File.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?php


if (class_exists('ParagonIE_Sodium_File', false)) {
return;
}
/**
* Class ParagonIE_Sodium_File
*/
Expand Down

0 comments on commit fc1f09e

Please sign in to comment.