]> git.lizzy.rs Git - PAKEs.git/blobdiff - spake2/src/lib.rs
spake2: initial `no_std` support (#87)
[PAKEs.git] / spake2 / src / lib.rs
index 1c87a5cdc0230ff5115325bf23a6c8db1239812e..61f7973ff21aefe51a8e37d6ff9833ff4489fa70 100644 (file)
@@ -1,7 +1,8 @@
-#![forbid(unsafe_code)]
-#![warn(rust_2018_idioms, unused_qualifications)]
+#![no_std]
 #![doc(html_logo_url = "https://raw.githubusercontent.com/RustCrypto/meta/master/logo_small.png")]
 #![doc = include_str!("../README.md")]
+#![forbid(unsafe_code)]
+#![warn(rust_2018_idioms, unused_qualifications)]
 
 //! # Usage
 //!
 //! [6]: http://eprint.iacr.org/2003/038.pdf "Pretty-Simple Password-Authenticated Key-Exchange Under Standard Assumptions"
 //! [7]: https://moderncrypto.org/mail-archive/curves/2015/000419.html "PAKE questions"
 
+#[allow(unused_imports)]
+#[macro_use]
+extern crate alloc;
+
+#[cfg(feature = "std")]
+#[cfg_attr(test, macro_use)]
+extern crate std;
+
+use alloc::vec::Vec;
 use core::{fmt, ops::Deref, str};
 use curve25519_dalek::{
     constants::ED25519_BASEPOINT_POINT,