if (ParagonIE_Sodium_Core_Util::
strlen($keypair) !== self::CRYPTO_BOX_KEYPAIRBYTES
) { throw new SodiumException('Argument 1 must be CRYPTO_BOX_KEYPAIRBYTES long.'
);
} if (self::
useNewSodiumAPI()) { return (string) sodium_crypto_box_publickey($keypair);
} if (self::
use_fallback('crypto_box_publickey'
)) { return (string) call_user_func('\\Sodium\\crypto_box_publickey',
$keypair);
} if (PHP_INT_SIZE === 4
) { return ParagonIE_Sodium_Crypto32::
box_publickey($keypair);
} return ParagonIE_Sodium_Crypto::
box_publickey($keypair);
} /**
* Calculate the X25519 public key from a given X25519 secret key.
*
* @param string $secretKey Any X25519 secret key
* @return string The corresponding X25519 public key
* @throws SodiumException
* @throws TypeError
* @psalm-suppress MixedArgument
*/