pub fn new(key: &WebSocketKey) -> WebSocketAccept {
		let serialized = key.serialize();
		let mut concat_key = String::with_capacity(serialized.len() + 36);
		concat_key.push_str(&serialized[..]);
		concat_key.push_str(MAGIC_GUID);
		let mut sha1 = Sha1::new();
		sha1.update(concat_key.as_bytes());
		let bytes = sha1.digest().bytes();
		WebSocketAccept(bytes)
	}
/// Create a new WebSocketAccept from the given WebSocketKey
Create a new WebSocketAccept from the given WebSocketKey
Create a new WebSocketAccept from the given WebSocketKey
pub fn new(key: &WebSocketKey) -> WebSocketAccept {
		let serialized = key.serialize();
		let mut concat_key = String::with_capacity(serialized.len() + 36);
		concat_key.push_str(&serialized[..]);
		concat_key.push_str(MAGIC_GUID);
		let mut sha1 = Sha1::new();
		sha1.update(concat_key.as_bytes());
		let bytes = sha1.digest().bytes();
		WebSocketAccept(bytes)
	}
pub fn new ( key : & WebSocketKey ) -> WebSocketAccept { let serialized = key . serialize ( ) ; let mut concat_key = String :: with_capacity ( serialized . len ( ) + 36 ) ; concat_key . push_str ( & serialized [ .. ] ) ; concat_key . push_str ( MAGIC_GUID ) ; let mut sha1 = Sha1 :: new ( ) ; sha1 . update ( concat_key . as_bytes ( ) ) ; let bytes = sha1 . digest ( ) . bytes ( ) ; WebSocketAccept ( bytes ) }
Create a new WebSocketAccept from the given WebSocketKey
Create a new WebSocketAccept from the given WebSocketKey
key
&WebSocketKey
key
&WebSocketKey