(rs: &Url)
| 557 | } |
| 558 | |
| 559 | pub fn compute_key(rs: &Url) -> String { |
| 560 | let mut hasher = Sha256::new(); |
| 561 | let input = format!("{}{}", rs.origin().ascii_serialization(), rs.path()); |
| 562 | hasher.update(input.as_bytes()); |
| 563 | format!("{:x}", hasher.finalize()) |
| 564 | } |
| 565 | |
| 566 | /// This is our own implementation of [OAuthState::start_authorization]. |
| 567 | /// This differs from [OAuthState::start_authorization] by assigning our own client_id for DCR. |