hashes: Introduce SPDX license identifiers
Whether or not every file needs an explicit license comment is out of scope for this patch; in the `bitcoin` crate we use SPDX identifiers because they are a single line with no loss of "benefit" over any longer form. Use SPDX identifiers in `hashes`. Drop the mention of re-licensing code from Apache to CC0-1 (because the original code was written by Andrew as well as the copied code then if the argument ever comes up it can be easily countered).
This commit is contained in:
parent
984fe69448
commit
99673ab5c4
|
@ -1,3 +1,5 @@
|
||||||
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
//! Useful comparison functions.
|
//! Useful comparison functions.
|
||||||
|
|
||||||
/// Compare two slices for equality in fixed time. Panics if the slices are of non-equal length.
|
/// Compare two slices for equality in fixed time. Panics if the slices are of non-equal length.
|
||||||
|
|
|
@ -1,16 +1,4 @@
|
||||||
// Bitcoin Hashes Library
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
// Written in 2018 by
|
|
||||||
// Andrew Poelstra <apoelstra@wpsoftware.net>
|
|
||||||
//
|
|
||||||
// To the extent possible under law, the author(s) have dedicated all
|
|
||||||
// copyright and related and neighboring rights to this software to
|
|
||||||
// the public domain worldwide. This software is distributed without
|
|
||||||
// any warranty.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the CC0 Public Domain Dedication
|
|
||||||
// along with this software.
|
|
||||||
// If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
|
|
||||||
//
|
|
||||||
|
|
||||||
//! Crate error type.
|
//! Crate error type.
|
||||||
//!
|
//!
|
||||||
|
|
|
@ -1,17 +1,5 @@
|
||||||
// Bitcoin Hashes Library
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
// Written in 2018 by
|
|
||||||
// Andrew Poelstra <apoelstra@wpsoftware.net>
|
|
||||||
//
|
//
|
||||||
// To the extent possible under law, the author(s) have dedicated all
|
|
||||||
// copyright and related and neighboring rights to this software to
|
|
||||||
// the public domain worldwide. This software is distributed without
|
|
||||||
// any warranty.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the CC0 Public Domain Dedication
|
|
||||||
// along with this software.
|
|
||||||
// If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
|
|
||||||
//
|
|
||||||
|
|
||||||
// This module is largely copied from the rust-crypto ripemd.rs file;
|
// This module is largely copied from the rust-crypto ripemd.rs file;
|
||||||
// while rust-crypto is licensed under Apache, that file specifically
|
// while rust-crypto is licensed under Apache, that file specifically
|
||||||
// was written entirely by Andrew Poelstra, who is re-licensing its
|
// was written entirely by Andrew Poelstra, who is re-licensing its
|
||||||
|
|
|
@ -1,16 +1,4 @@
|
||||||
// Bitcoin Hashes Library
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
// Written in 2018 by
|
|
||||||
// Andrew Poelstra <apoelstra@wpsoftware.net>
|
|
||||||
//
|
|
||||||
// To the extent possible under law, the author(s) have dedicated all
|
|
||||||
// copyright and related and neighboring rights to this software to
|
|
||||||
// the public domain worldwide. This software is distributed without
|
|
||||||
// any warranty.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the CC0 Public Domain Dedication
|
|
||||||
// along with this software.
|
|
||||||
// If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
|
|
||||||
//
|
|
||||||
|
|
||||||
//! Hex encoding and decoding.
|
//! Hex encoding and decoding.
|
||||||
//!
|
//!
|
||||||
|
|
|
@ -1,16 +1,4 @@
|
||||||
// Bitcoin Hashes Library
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
// Written in 2018 by
|
|
||||||
// Andrew Poelstra <apoelstra@wpsoftware.net>
|
|
||||||
//
|
|
||||||
// To the extent possible under law, the author(s) have dedicated all
|
|
||||||
// copyright and related and neighboring rights to this software to
|
|
||||||
// the public domain worldwide. This software is distributed without
|
|
||||||
// any warranty.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the CC0 Public Domain Dedication
|
|
||||||
// along with this software.
|
|
||||||
// If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
|
|
||||||
//
|
|
||||||
|
|
||||||
// This module is largely copied from the rust-crypto ripemd.rs file;
|
// This module is largely copied from the rust-crypto ripemd.rs file;
|
||||||
// while rust-crypto is licensed under Apache, that file specifically
|
// while rust-crypto is licensed under Apache, that file specifically
|
||||||
|
|
|
@ -1,16 +1,4 @@
|
||||||
// Bitcoin Hashes Library
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
// Written in 2019 by
|
|
||||||
// Andrew Poelstra <apoelstra@wpsoftware.net>
|
|
||||||
//
|
|
||||||
// To the extent possible under law, the author(s) have dedicated all
|
|
||||||
// copyright and related and neighboring rights to this software to
|
|
||||||
// the public domain worldwide. This software is distributed without
|
|
||||||
// any warranty.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the CC0 Public Domain Dedication
|
|
||||||
// along with this software.
|
|
||||||
// If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
|
|
||||||
//
|
|
||||||
|
|
||||||
//! `std` / `core2` Impls.
|
//! `std` / `core2` Impls.
|
||||||
//!
|
//!
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
//! Non-public macros
|
//! Non-public macros
|
||||||
|
|
||||||
macro_rules! arr_newtype_fmt_impl {
|
macro_rules! arr_newtype_fmt_impl {
|
||||||
|
|
|
@ -1,16 +1,4 @@
|
||||||
// Bitcoin Hashes Library
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
// Written in 2018 by
|
|
||||||
// Andrew Poelstra <apoelstra@wpsoftware.net>
|
|
||||||
//
|
|
||||||
// To the extent possible under law, the author(s) have dedicated all
|
|
||||||
// copyright and related and neighboring rights to this software to
|
|
||||||
// the public domain worldwide. This software is distributed without
|
|
||||||
// any warranty.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the CC0 Public Domain Dedication
|
|
||||||
// along with this software.
|
|
||||||
// If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
|
|
||||||
//
|
|
||||||
|
|
||||||
//! Rust hashes library.
|
//! Rust hashes library.
|
||||||
//!
|
//!
|
||||||
|
|
|
@ -1,21 +1,4 @@
|
||||||
// Bitcoin Hashes Library
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
// Written in 2018 by
|
|
||||||
// Andrew Poelstra <apoelstra@wpsoftware.net>
|
|
||||||
//
|
|
||||||
// To the extent possible under law, the author(s) have dedicated all
|
|
||||||
// copyright and related and neighboring rights to this software to
|
|
||||||
// the public domain worldwide. This software is distributed without
|
|
||||||
// any warranty.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the CC0 Public Domain Dedication
|
|
||||||
// along with this software.
|
|
||||||
// If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
|
|
||||||
//
|
|
||||||
|
|
||||||
// This module is largely copied from the rust-crypto ripemd.rs file;
|
|
||||||
// while rust-crypto is licensed under Apache, that file specifically
|
|
||||||
// was written entirely by Andrew Poelstra, who is re-licensing its
|
|
||||||
// contents here as CC0.
|
|
||||||
|
|
||||||
//! RIPEMD160 implementation.
|
//! RIPEMD160 implementation.
|
||||||
//!
|
//!
|
||||||
|
|
|
@ -1,16 +1,4 @@
|
||||||
// Bitcoin Hashes Library
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
// Written in 2018 by
|
|
||||||
// Andrew Poelstra <apoelstra@wpsoftware.net>
|
|
||||||
//
|
|
||||||
// To the extent possible under law, the author(s) have dedicated all
|
|
||||||
// copyright and related and neighboring rights to this software to
|
|
||||||
// the public domain worldwide. This software is distributed without
|
|
||||||
// any warranty.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the CC0 Public Domain Dedication
|
|
||||||
// along with this software.
|
|
||||||
// If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
|
|
||||||
//
|
|
||||||
|
|
||||||
//! Macros for serde trait implementations, and supporting code.
|
//! Macros for serde trait implementations, and supporting code.
|
||||||
//!
|
//!
|
||||||
|
|
|
@ -1,16 +1,4 @@
|
||||||
// Bitcoin Hashes Library
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
// Written in 2018 by
|
|
||||||
// Andrew Poelstra <apoelstra@wpsoftware.net>
|
|
||||||
//
|
|
||||||
// To the extent possible under law, the author(s) have dedicated all
|
|
||||||
// copyright and related and neighboring rights to this software to
|
|
||||||
// the public domain worldwide. This software is distributed without
|
|
||||||
// any warranty.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the CC0 Public Domain Dedication
|
|
||||||
// along with this software.
|
|
||||||
// If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
|
|
||||||
//
|
|
||||||
|
|
||||||
//! SHA1 implementation.
|
//! SHA1 implementation.
|
||||||
//!
|
//!
|
||||||
|
|
|
@ -1,16 +1,4 @@
|
||||||
// Bitcoin Hashes Library
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
// Written in 2018 by
|
|
||||||
// Andrew Poelstra <apoelstra@wpsoftware.net>
|
|
||||||
//
|
|
||||||
// To the extent possible under law, the author(s) have dedicated all
|
|
||||||
// copyright and related and neighboring rights to this software to
|
|
||||||
// the public domain worldwide. This software is distributed without
|
|
||||||
// any warranty.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the CC0 Public Domain Dedication
|
|
||||||
// along with this software.
|
|
||||||
// If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
|
|
||||||
//
|
|
||||||
|
|
||||||
//! SHA256 implementation.
|
//! SHA256 implementation.
|
||||||
//!
|
//!
|
||||||
|
|
|
@ -1,16 +1,4 @@
|
||||||
// Bitcoin Hashes Library
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
// Written in 2018 by
|
|
||||||
// Andrew Poelstra <apoelstra@wpsoftware.net>
|
|
||||||
//
|
|
||||||
// To the extent possible under law, the author(s) have dedicated all
|
|
||||||
// copyright and related and neighboring rights to this software to
|
|
||||||
// the public domain worldwide. This software is distributed without
|
|
||||||
// any warranty.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the CC0 Public Domain Dedication
|
|
||||||
// along with this software.
|
|
||||||
// If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
|
|
||||||
//
|
|
||||||
|
|
||||||
//! SHA256d implementation (double SHA256).
|
//! SHA256d implementation (double SHA256).
|
||||||
//!
|
//!
|
||||||
|
|
|
@ -1,16 +1,4 @@
|
||||||
// Bitcoin Hashes Library
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
// Written in 2019 by
|
|
||||||
// The rust-bitcoin developers.
|
|
||||||
//
|
|
||||||
// To the extent possible under law, the author(s) have dedicated all
|
|
||||||
// copyright and related and neighboring rights to this software to
|
|
||||||
// the public domain worldwide. This software is distributed without
|
|
||||||
// any warranty.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the CC0 Public Domain Dedication
|
|
||||||
// along with this software.
|
|
||||||
// If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
|
|
||||||
//
|
|
||||||
|
|
||||||
//! SHA256t implementation (tagged SHA256).
|
//! SHA256t implementation (tagged SHA256).
|
||||||
//!
|
//!
|
||||||
|
|
|
@ -1,21 +1,4 @@
|
||||||
// Bitcoin Hashes Library
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
// Written in 2018 by
|
|
||||||
// Andrew Poelstra <apoelstra@wpsoftware.net>
|
|
||||||
//
|
|
||||||
// To the extent possible under law, the author(s) have dedicated all
|
|
||||||
// copyright and related and neighboring rights to this software to
|
|
||||||
// the public domain worldwide. This software is distributed without
|
|
||||||
// any warranty.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the CC0 Public Domain Dedication
|
|
||||||
// along with this software.
|
|
||||||
// If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
|
|
||||||
//
|
|
||||||
|
|
||||||
// This module is largely copied from the rust-crypto ripemd.rs file;
|
|
||||||
// while rust-crypto is licensed under Apache, that file specifically
|
|
||||||
// was written entirely by Andrew Poelstra, who is re-licensing its
|
|
||||||
// contents here as CC0.
|
|
||||||
|
|
||||||
//! SHA512 implementation.
|
//! SHA512 implementation.
|
||||||
//!
|
//!
|
||||||
|
|
|
@ -1,21 +1,4 @@
|
||||||
// Bitcoin Hashes Library
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
// Written in 2022 by
|
|
||||||
// The rust-bitcoin developers.
|
|
||||||
//
|
|
||||||
// To the extent possible under law, the author(s) have dedicated all
|
|
||||||
// copyright and related and neighboring rights to this software to
|
|
||||||
// the public domain worldwide. This software is distributed without
|
|
||||||
// any warranty.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the CC0 Public Domain Dedication
|
|
||||||
// along with this software.
|
|
||||||
// If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
|
|
||||||
//
|
|
||||||
|
|
||||||
// This module is largely copied from the rust-crypto ripemd.rs file;
|
|
||||||
// while rust-crypto is licensed under Apache, that file specifically
|
|
||||||
// was written entirely by Andrew Poelstra, who is re-licensing its
|
|
||||||
// contents here as CC0.
|
|
||||||
|
|
||||||
//! SHA512_256 implementation.
|
//! SHA512_256 implementation.
|
||||||
//!
|
//!
|
||||||
|
|
|
@ -1,21 +1,4 @@
|
||||||
// Bitcoin Hashes Library
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
// Written in 2019 by
|
|
||||||
// The rust-bitcoin developers
|
|
||||||
//
|
|
||||||
// To the extent possible under law, the author(s) have dedicated all
|
|
||||||
// copyright and related and neighboring rights to this software to
|
|
||||||
// the public domain worldwide. This software is distributed without
|
|
||||||
// any warranty.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the CC0 Public Domain Dedication
|
|
||||||
// along with this software.
|
|
||||||
// If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
|
|
||||||
//
|
|
||||||
|
|
||||||
// This module is largely copied from the rust-siphash sip.rs file;
|
|
||||||
// while rust-siphash is licensed under Apache, that file specifically
|
|
||||||
// was written entirely by Steven Roose, who is re-licensing its
|
|
||||||
// contents here as CC0.
|
|
||||||
|
|
||||||
//! SipHash 2-4 implementation.
|
//! SipHash 2-4 implementation.
|
||||||
//!
|
//!
|
||||||
|
|
|
@ -1,16 +1,4 @@
|
||||||
// Bitcoin Hashes Library
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
// Written in 2018 by
|
|
||||||
// Andrew Poelstra <apoelstra@wpsoftware.net>
|
|
||||||
//
|
|
||||||
// To the extent possible under law, the author(s) have dedicated all
|
|
||||||
// copyright and related and neighboring rights to this software to
|
|
||||||
// the public domain worldwide. This software is distributed without
|
|
||||||
// any warranty.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the CC0 Public Domain Dedication
|
|
||||||
// along with this software.
|
|
||||||
// If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
|
|
||||||
//
|
|
||||||
|
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
/// Adds hexadecimal formatting implementation of a trait `$imp` to a given type `$ty`.
|
/// Adds hexadecimal formatting implementation of a trait `$imp` to a given type `$ty`.
|
||||||
|
|
Loading…
Reference in New Issue