X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Futil%2Fchacha20poly1305rfc.rs;h=3908116cccc85f03624c73cdb73d2ead507f0712;hb=cb83cfe366aaa07179cac1079694e9ea5c6cc9c6;hp=622af70acde6d0ebca871df2c812c78c53f3595b;hpb=4909d3cd6a05dfcba39fe08e6d8f539944c8ef66;p=rust-lightning diff --git a/lightning/src/util/chacha20poly1305rfc.rs b/lightning/src/util/chacha20poly1305rfc.rs index 622af70a..3908116c 100644 --- a/lightning/src/util/chacha20poly1305rfc.rs +++ b/lightning/src/util/chacha20poly1305rfc.rs @@ -1,12 +1,12 @@ // ring has a garbage API so its use is avoided, but rust-crypto doesn't have RFC-variant poly1305 // Instead, we steal rust-crypto's implementation and tweak it to match the RFC. - -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - +// +// This file is licensed under the Apache License, Version 2.0 or the MIT license +// , at your option. +// You may not use this file except in accordance with one or both of these +// licenses. +// // This is a port of Andrew Moons poly1305-donna // https://github.com/floodyberry/poly1305-donna @@ -51,8 +51,8 @@ mod real_chachapoly { ChaCha20Poly1305RFC::pad_mac_16(&mut mac, aad.len()); ChaCha20Poly1305RFC { - cipher: cipher, - mac: mac, + cipher, + mac, finished: false, data_len: 0, aad_len: aad.len() as u64,