VibeProtocol 0.1.0

Vibe Protocol is a secure, decentralized, and privacy-focused messaging protocol. Its designed using Sodium, Base64, and other cryptographic libraries to ensure the highest level of security and privacy.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#[cfg(test)]
mod base64_tests {
    use VibeProtocol::base64_wrapper::{encode_base64, decode_base64};

    #[test]
    fn test_encode_and_decode_base64() {
        let data = "vibe protocol";
        let encoded = encode_base64(data.as_bytes());

        // Base64 strings are always a multiple of 4 characters long
        assert!(encoded.len() % 4 == 0);

        let decoded = decode_base64(&encoded).expect("Decoding failed");

        // Make sure the decoded data matches the original data
        assert_eq!(decoded, data.as_bytes());
    }
}