fn sign_with_timestamp<S: AsRef<str>>(&self, value: S, timestamp: SystemTime) -> String {
        let value = value.as_ref();
        let encoded_timestamp = timestamp::encode(timestamp);
        let separator = self.0.separator().0;

        // Generate the signature.
        let signature = self
            .0
            .get_signer()
            .input_chained(value.as_bytes())
            .input_chained(&[separator as u8])
            .input_chained(encoded_timestamp.as_slice())
            .sign();

        // Generate the signed output string.
        let mut output = String::with_capacity(
            value.len() + 1 + encoded_timestamp.length() + 1 + self.0.signature_output_size(),
        );

        output.push_str(value);
        output.push(separator);
        output.push_str(encoded_timestamp.as_str());
        output.push(separator);
        signature.base64_encode_str(&mut output);

        output
    }
/// Signs a value with an arbitrary timestamp.
Signs a value with an arbitrary timestamp.
Signs a value with an arbitrary timestamp .
fn sign_with_timestamp<S: AsRef<str>>(&self, value: S, timestamp: SystemTime) -> String {
        let value = value.as_ref();
        let encoded_timestamp = timestamp::encode(timestamp);
        let separator = self.0.separator().0;
        // Generate the signature.
        let signature = self
            .0
            .get_signer()
            .input_chained(value.as_bytes())
            .input_chained(&[separator as u8])
            .input_chained(encoded_timestamp.as_slice())
            .sign();
        // Generate the signed output string.
        let mut output = String::with_capacity(
            value.len() + 1 + encoded_timestamp.length() + 1 + self.0.signature_output_size(),
        );
        output.push_str(value);
        output.push(separator);
        output.push_str(encoded_timestamp.as_str());
        output.push(separator);
        signature.base64_encode_str(&mut output);
        output
    }
fn sign_with_timestamp < S : AsRef < str > > ( & self , value : S , timestamp : SystemTime ) -> String { let value = value . as_ref ( ) ; let encoded_timestamp = timestamp :: encode ( timestamp ) ; let separator = self . 0 . separator ( ) . 0 ; // Generate the signature. let signature = self . 0 . get_signer ( ) . input_chained ( value . as_bytes ( ) ) . input_chained ( & [ separator as u8 ] ) . input_chained ( encoded_timestamp . as_slice ( ) ) . sign ( ) ; // Generate the signed output string. let mut output = String :: with_capacity ( value . len ( ) + 1 + encoded_timestamp . length ( ) + 1 + self . 0 . signature_output_size ( ) , ) ; output . push_str ( value ) ; output . push ( separator ) ; output . push_str ( encoded_timestamp . as_str ( ) ) ; output . push ( separator ) ; signature . base64_encode_str ( & mut output ) ; output }
Signs a value with an arbitrary timestamp.
Signs a value with an arbitrary timestamp .
&self
value
S
timestamp
SystemTime
&self
value
S
timestamp
SystemTime