keyauth_obf/
lib.rs

1/*!
2unofficial [keyauth](https://keyauth.cc) library that implements all versions of the api.
3to make an api version available use the feature flag for that version.
4example
5```toml
6keyauth = { version = "*" } # this will enable 1.2 api version (default)
7```
8by default the 1.2 api is enabled because it is most commonly used. so if you dont want the 1.2 api you have to disable it.
9```toml
10keyauth = { version = "*", features = ["v1_1", "seller"], default-features = false } # this will enable 1.1 and seller api
11```
12the ``default-features = false`` disabled the default v1_2 api.
13
14basic usage:
15```rust
16let mut auth = keyauth::v1_2::KeyauthApi::new("application name", "ownerid", "application secret", "application version", "api url"); // if you dont have a custom domain for api use "https://keyauth.win/api/1.2/"
17auth.init(None).unwrap(); // None -> no hash set, Some("hash") -> if you have has checking enabled
18auth.login("username".to_string(), "password".to_string(), Some("hwid".to_string())).unwrap(); // if you want to automaticly generate hwid use None insted of Some(...)
19```
20
21also if you want to use an obfuscator for rust i recommend using [obfstr](https://crates.io/crates/obfstr) and [llvm obfuscator](https://github.com/eshard/obfuscator-llvm/wiki/Rust-obfuscation-guide)
22
23if the panic feature is enabled then the v1_2 api will panic insted of returning an error when it detects that the request was tampered with
24*/
25
26#[cfg(feature = "v1_2")]
27pub mod v1_2;