Lines Matching full:algorithm
72 /// A key agreement algorithm.
73 pub struct Algorithm { struct
82 derive_debug_via_field!(Algorithm, curve); argument
84 impl Eq for Algorithm {} implementation
85 impl PartialEq for Algorithm { implementation
86 fn eq(&self, other: &Algorithm) -> bool { in eq()
96 algorithm: &'static Algorithm, field
102 algorithm
106 /// Generate a new ephemeral private key for the given algorithm.
108 alg: &'static Algorithm, in generate() argument
120 algorithm: alg, in generate()
135 algorithm: self.algorithm, in compute_public_key()
140 /// The algorithm for the private key.
142 pub fn algorithm(&self) -> &'static Algorithm { in algorithm() argument
143 self.algorithm in algorithm()
155 algorithm: &'static Algorithm, field
168 .field("algorithm", &self.algorithm) in fmt()
175 /// The algorithm for the public key.
177 pub fn algorithm(&self) -> &'static Algorithm { in algorithm() argument
178 self.algorithm in algorithm()
184 algorithm: &'static Algorithm, field
196 algorithm: self.algorithm, in clone()
208 .field("algorithm", &self.algorithm) in fmt()
216 pub fn new(algorithm: &'static Algorithm, bytes: B) -> Self { in new() argument
217 Self { algorithm, bytes } in new()
222 pub fn algorithm(&self) -> &'static Algorithm { in algorithm() argument
223 self.algorithm in algorithm()
241 /// `Err(error_value)` if it does not match `my_private_key's` algorithm/curve.
243 /// algorithm and that the key is *valid*; see the algorithm's documentation for
245 /// that algorithm.
265 algorithm: peer_public_key.algorithm, in agree_ephemeral()
285 if peer_public_key.algorithm != my_private_key.algorithm { in agree_ephemeral_()
289 let alg = &my_private_key.algorithm; in agree_ephemeral_()