calculate sign
This commit is contained in:
parent
6e2376e3d0
commit
4c0f101be8
@ -39,8 +39,9 @@ fn do_calculate(data: &[u8]) -> Result<String>{
|
|||||||
|
|
||||||
impl <'a> HMacCalculator for TokenLoginData<'a> {
|
impl <'a> HMacCalculator for TokenLoginData<'a> {
|
||||||
fn calculate_hmac(&self) -> Result<String> {
|
fn calculate_hmac(&self) -> Result<String> {
|
||||||
let data = format!("client_id={}&mac={}&system={}&token={}&version={}",
|
let data = format!("client_id={}&hostname={}&mac={}&system={}&token={}&version={}",
|
||||||
self.client_id,
|
self.client_id,
|
||||||
|
self.hostname,
|
||||||
self.mac,
|
self.mac,
|
||||||
self.system,
|
self.system,
|
||||||
self.token,
|
self.token,
|
||||||
@ -64,8 +65,9 @@ struct UserPassLoginData<'a> {
|
|||||||
|
|
||||||
impl HMacCalculator for UserPassLoginData<'_> {
|
impl HMacCalculator for UserPassLoginData<'_> {
|
||||||
fn calculate_hmac(&self) -> Result<String> {
|
fn calculate_hmac(&self) -> Result<String> {
|
||||||
let data = format!("client_id={}&mac={}&password={}&system={}&username={}&version={}",
|
let data = format!("client_id={}&hostname={}&mac={}&password={}&system={}&username={}&version={}",
|
||||||
self.client_id,
|
self.client_id,
|
||||||
|
self.hostname,
|
||||||
self.mac,
|
self.mac,
|
||||||
self.password,
|
self.password,
|
||||||
self.system,
|
self.system,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user