pub fn sign_request(
    sub_key: impl AsRef<str>,
    pub_key: impl AsRef<str>,
    path: impl AsRef<str>,
    qs: impl IntoIterator<Item = (impl AsRef<str>, impl AsRef<str>)>,
    sec_key: impl AsRef<str>,
) -> Result<String, CryptoError> {
    let nqs = normalize_query_string(qs);
    let input = format!(
        "{}\n{}\n{}\n{}",
        sub_key.as_ref(),
        pub_key.as_ref(),
        path.as_ref(),
        nqs
    );

    debug!("input: {}", input);

    let code = sign(input, sec_key)?;
    let encoded = encode_config(code.as_ref(), URL_SAFE);
    debug!("encoded: {}", encoded);

    Ok(encoded)
}
/// Computes the signature for a request with the given path and query string parameters
/// using the supplied subscribe key, publish key, and secret key.
Computes the signature for a request with the given path and query string parameters
using the supplied subscribe key, publish key, and secret key.
Computes the signature for a request with the given path and query string parameters using the supplied subscribe key publish key and secret key .
pub fn sign_request(
    sub_key: impl AsRef<str>,
    pub_key: impl AsRef<str>,
    path: impl AsRef<str>,
    qs: impl IntoIterator<Item = (impl AsRef<str>, impl AsRef<str>)>,
    sec_key: impl AsRef<str>,
) -> Result<String, CryptoError> {
    let nqs = normalize_query_string(qs);
    let input = format!(
        "{}\n{}\n{}\n{}",
        sub_key.as_ref(),
        pub_key.as_ref(),
        path.as_ref(),
        nqs
    );
    debug!("input: {}", input);
    let code = sign(input, sec_key)?;
    let encoded = encode_config(code.as_ref(), URL_SAFE);
    debug!("encoded: {}", encoded);
    Ok(encoded)
}
pub fn sign_request ( sub_key : impl AsRef < str > , pub_key : impl AsRef < str > , path : impl AsRef < str > , qs : impl IntoIterator < Item = ( impl AsRef < str > , impl AsRef < str > ) > , sec_key : impl AsRef < str > , ) -> Result < String , CryptoError > { let nqs = normalize_query_string ( qs ) ; let input = format ! ( " \n \n \n " sub_key as_ref ( ) pub_key as_ref ( ) path as_ref ( ) nqs ) ; debug ! ( " " input ) ; let code = sign ( input , sec_key ) ? ; let encoded = encode_config ( code . as_ref ( ) , URL_SAFE ) ; debug ! ( " " encoded ) ; Ok ( encoded ) }
Computes the signature for a request with the given path and query string parameters
using the supplied subscribe key, publish key, and secret key.
Computes the signature for a request with the given path and query string parameters using the supplied subscribe key publish key and secret key .
sub_key
impl AsRef<str>
pub_key
impl AsRef<str>
path
impl AsRef<str>
qs
impl IntoIterator<Item = (impl AsRef<str>, impl AsRef<str>)>
sec_key
impl AsRef<str>