File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 158
158
//! let seal_prepared_nonce = sealing_key.prepare_nonce()?;
159
159
//!
160
160
//! // Query the nonce that will be used for our seal operation with our prepared nonce
161
- //! let seal_nonce_bytes = Vec::from(seal_prepared_nonce.nonce().as_ref());
161
+ //! let seal_nonce_bytes = Vec::from(seal_prepared_nonce.nonce().as_ref().as_slice() );
162
162
//!
163
163
//! // Use the prepared nonce and seal the plaintext
164
164
//! seal_prepared_nonce.seal_in_place_append_tag(Aad::empty(), &mut in_out)?;
167
167
//! let open_prepared_nonce = opening_key.prepare_nonce()?;
168
168
//!
169
169
//! // Query the nonce that will be used for our seal operation with our prepared nonce
170
- //! let open_nonce_bytes = Vec::from(open_prepared_nonce.nonce().as_ref());
170
+ //! let open_nonce_bytes = Vec::from(open_prepared_nonce.nonce().as_ref().as_slice() );
171
171
//!
172
172
//! // Since we initialized the Counter32Builder the same between both builders the nonce here
173
173
//! // will match the one from the opening key.
Original file line number Diff line number Diff line change @@ -694,8 +694,8 @@ fn prepare_nonce() {
694
694
for _ in 0 ..( LIMIT / 2 ) {
695
695
let skpn = sk. prepare_nonce ( ) . unwrap ( ) ;
696
696
let okpn = ok. prepare_nonce ( ) . unwrap ( ) ;
697
- let so_nonce = Vec :: from ( skpn. nonce ( ) . as_ref ( ) ) ;
698
- let oo_nonce = Vec :: from ( okpn. nonce ( ) . as_ref ( ) ) ;
697
+ let so_nonce = Vec :: from ( skpn. nonce ( ) . as_ref ( ) . as_slice ( ) ) ;
698
+ let oo_nonce = Vec :: from ( okpn. nonce ( ) . as_ref ( ) . as_slice ( ) ) ;
699
699
700
700
assert_eq ! ( so_nonce. as_slice( ) , oo_nonce. as_slice( ) ) ;
701
701
assert ! ( !nonces. contains( & so_nonce) ) ;
@@ -714,8 +714,8 @@ fn prepare_nonce() {
714
714
715
715
let so = sk. prepare_nonce ( ) . unwrap ( ) ;
716
716
let oo = ok. prepare_nonce ( ) . unwrap ( ) ;
717
- let so_nonce = Vec :: from ( so. nonce ( ) . as_ref ( ) ) ;
718
- let oo_nonce = Vec :: from ( oo. nonce ( ) . as_ref ( ) ) ;
717
+ let so_nonce = Vec :: from ( so. nonce ( ) . as_ref ( ) . as_slice ( ) ) ;
718
+ let oo_nonce = Vec :: from ( oo. nonce ( ) . as_ref ( ) . as_slice ( ) ) ;
719
719
720
720
assert_eq ! ( so_nonce. as_slice( ) , oo_nonce. as_slice( ) ) ;
721
721
assert ! ( !nonces. contains( & so_nonce) ) ;
You can’t perform that action at this time.
0 commit comments