mirror of
https://gitlab.com/xmpp-rs/xmpp-rs.git
synced 2024-07-12 22:21:53 +00:00
ecaps2: Remove extraneous borrowing on base64::encode.
This commit is contained in:
parent
049ef23595
commit
7fc40dbb19
1 changed files with 2 additions and 2 deletions
|
@ -143,14 +143,14 @@ pub fn hash_ecaps2(data: &[u8], algo: &str) -> String {
|
|||
hasher.input(data);
|
||||
let mut buf: [u8; 32] = [0; 32];
|
||||
let hash = hasher.variable_result(&mut buf).unwrap();
|
||||
base64::encode(&hash)
|
||||
base64::encode(hash)
|
||||
},
|
||||
"blake2b-512" => {
|
||||
let mut hasher = Blake2b::default();
|
||||
hasher.input(data);
|
||||
let mut buf: [u8; 64] = [0; 64];
|
||||
let hash = hasher.variable_result(&mut buf).unwrap();
|
||||
base64::encode(&hash)
|
||||
base64::encode(hash)
|
||||
},
|
||||
_ => panic!(),
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue