Function bitcoin_tor::compute_response
source · pub fn compute_response(
key: &String,
cookie: &Vec<u8>,
client_nonce: &Vec<u8>,
server_nonce: &Vec<u8>
) -> Vec<u8>Expand description
| Compute Tor SAFECOOKIE response. | | ServerHash is computed as: | | HMAC-SHA256(“Tor safe cookie | authentication | server-to-controller hash”, | CookieString | ClientNonce | ServerNonce) | | (with the HMAC key as its first argument) | | After a controller sends a successful | AUTHCHALLENGE command, the next command sent | on the connection must be an AUTHENTICATE | command, and the only authentication string | which that AUTHENTICATE command will accept | is: | | HMAC-SHA256(“Tor safe cookie | authentication | controller-to-server hash”, | CookieString | ClientNonce | ServerNonce) |