idcrypt 0.2.0

A library for securely collecting, encrypting, and verifying identity information with field-level authorization.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
pub mod authority;
pub mod collection;
pub mod profile;
pub use p256::{ecdsa::SigningKey, SecretKey};
pub use crate::{authority::Authority, profile::ProfileExtractor};
use bitflags::bitflags;

bitflags! {
    #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
    pub struct Ustc: u8 {
        const UID = 1;
        const GID = 1 << 1;
        const SEX = 1 << 2;
        const NAME = 1 << 3;
        const DEPT = 1 << 4;
        const EMAIL = 1 << 5;
    }
}