1 /// RSA public key components 2 #[derive(Debug)] 3 pub struct Components<B: AsRef<[u8]> + core::fmt::Debug> { 4 /// The public modulus, encoded in big-endian bytes without leading zeros. 5 pub n: B, 6 7 /// The public exponent, encoded in big-endian bytes without leading zeros. 8 pub e: B, 9 } 10 11 impl<B: Copy> Copy for Components<B> where B: AsRef<[u8]> + core::fmt::Debug {} 12 13 impl<B: Clone> Clone for Components<B> 14 where 15 B: AsRef<[u8]> + core::fmt::Debug, 16 { clone(&self) -> Self17 fn clone(&self) -> Self { 18 Self { 19 n: self.n.clone(), 20 e: self.e.clone(), 21 } 22 } 23 } 24