fn convert_key(key: &str) -> String {
    let mut key = key.to_string().into_bytes();
    key.extend("258EAFA5-E914-47DA-95CA-C5AB0DC85B11".as_bytes());
    base64::encode(sha1::Sha1::from(key).digest().bytes())
}
/// Convert a key into a Sec-Websocket-Accept header
Convert a key into a Sec-Websocket-Accept header
Convert a key into a Sec - Websocket - Accept header
fn convert_key(key: &str) -> String {
    let mut key = key.to_string().into_bytes();
    key.extend("258EAFA5-E914-47DA-95CA-C5AB0DC85B11".as_bytes());
    base64::encode(sha1::Sha1::from(key).digest().bytes())
}
fn convert_key ( key : & str ) -> String { let mut key = key . to_string ( ) . into_bytes ( ) ; key . extend ( " " . as_bytes ( ) ) ; base64 :: encode ( sha1 :: Sha1 :: from ( key ) . digest ( ) . bytes ( ) ) }
Convert a key into a Sec-Websocket-Accept header
Convert a key into a Sec - Websocket - Accept header
key
&str
key
&str