A second crack at fixed-sized numbers.

This commit is contained in:
2018-06-02 09:26:34 -07:00
parent f3d4b102c0
commit f088f0f9a5
68 changed files with 177087 additions and 40 deletions

View File

@@ -3,22 +3,15 @@
//! This module is designed to provide large, fixed-width number support for
//! the rest of the Simple-Crypto libraries. Feel free to use it other places,
//! of course, but that's its origin.
mod core;
//!
mod addition;
mod basetypes;
mod comparison;
#[macro_use]
mod builder;
mod traits;
mod conversions;
mod encoding;
mod multiplication;
mod subtraction;
use self::core::*;
use self::traits::*;
use std::cmp::Ordering;
use std::fmt::{Debug,Error,Formatter};
use std::ops::*;
construct_unsigned!(U512, u512, 8);
construct_unsigned!(U1024, u1024, 16);
construct_unsigned!(U2048, u2048, 32);
construct_unsigned!(U3072, u3072, 48);
construct_unsigned!(U4096, u4096, 64);
construct_unsigned!(U7680, u7680, 120);
construct_unsigned!(U8192, u8192, 128);
construct_unsigned!(U15360, u15360, 240);
pub use self::basetypes::*;
pub use self::encoding::Decoder;