Home
last modified time | relevance | path

Searched refs:ctx (Results 1 – 6 of 6) sorted by relevance

/rust/bssl-crypto/src/
A Ddigest.rs87 ctx: bssl_sys::SHA_CTX, field
104 ctx: bssl_sys::SHA256_CTX, field
121 ctx: bssl_sys::SHA512_CTX, field
138 ctx: bssl_sys::SHA512_CTX, field
155 ctx: bssl_sys::SHA512_CTX, field
210 let mut ctx = Sha256::new(); in sha256() variables
211 ctx.update(&msg); in sha256()
214 let mut ctx = Sha256::new(); in sha256() variables
215 ctx.update(&msg[0..1]); in sha256()
216 let mut ctx2 = ctx.clone(); in sha256()
[all …]
A Dmacros.rs71 ctx: crate::initialized_struct(|ctx| {
74 bssl_sys::$init(ctx);
84 bssl_sys::$update(&mut self.ctx, input.as_ffi_void_ptr(), input.len());
94 bssl_sys::$final_func(out, &mut self.ctx);
101 fn from(ctx: $name) -> [u8; $output_len] {
102 ctx.digest()
107 fn from(ctx: $name) -> alloc::vec::Vec<u8> {
108 ctx.digest_to_vec()
A Dhmac.rs240 ctx: bssl_sys::HMAC_CTX, field
255 ctx: unsafe { initialized_struct(|ctx| bssl_sys::HMAC_CTX_init(ctx)) }, in new_from_slice()
267 &mut ret.ctx, in new_from_slice()
282 let result = unsafe { bssl_sys::HMAC_Update(&mut self.ctx, data.as_ffi_ptr(), data.len()) }; in update()
298 unsafe { bssl_sys::HMAC_Final(&mut self.ctx, buf.as_mut_ffi_ptr(), &mut size) };
352 ctx: unsafe { initialized_struct(|ctx| bssl_sys::HMAC_CTX_init(ctx)) }, in clone()
357 let result = unsafe { bssl_sys::HMAC_CTX_copy(&mut ret.ctx, &self.ctx) }; in clone()
365 unsafe { bssl_sys::HMAC_CTX_cleanup(&mut self.ctx) } in drop()
A Dhpke.rs272 let mut ctx = scoped::EvpHpkeCtx::new(); in new() variables
281 ctx.as_mut_ffi_ptr(), in new()
300 .map(|enc_key| (Self(ctx), enc_key)) in new()
395 let mut ctx = scoped::EvpHpkeCtx::new(); in new() variables
404 ctx.as_mut_ffi_ptr(), in new()
415 Some(Self(ctx)) in new()
608 let mut ctx = scoped::EvpHpkeCtx::new(); in new_sender_context_for_testing() variables
618 ctx.as_mut_ffi_ptr(), in new_sender_context_for_testing()
640 (SenderContext(ctx), encapsulated_key) in new_sender_context_for_testing()
652 let (mut ctx, encapsulated_key) = new_sender_context_for_testing( in seal_with_vector()
[all …]
A Daead.rs370 let ctx = new_func(&test.key);
371 let ciphertext = ctx.seal(&test.nonce, test.msg.as_slice(), test.ad.as_slice());
374 let plaintext = ctx
/rust/bssl-crypto/src/cipher/
A Dmod.rs133 ctx: *mut bssl_sys::EVP_CIPHER_CTX, field
142 assert!(!ctx.is_null()); in new()
153 ctx, in new()
162 ctx, in new()
173 ctx, in new()
181 unsafe { bssl_sys::EVP_CIPHER_CTX_mode(self.ctx) } in cipher_mode()
201 self.ctx, in apply_keystream_in_place()
243 self.ctx, in encrypt()
268 self.ctx, in encrypt()
312 self.ctx, in decrypt()
[all …]

Completed in 21 milliseconds