@@ -160,21 +160,21 @@ mod allocating {
160160 self . as_mcf_hash_ref ( ) . fields ( )
161161 }
162162
163- /// Push an additional field onto the password hash string, first adding a leading `$`.
164- pub fn push_field ( & mut self , field : Field < ' _ > ) {
163+ /// Encode the given data as the specified variant of Base64 and push it onto the password
164+ /// hash string, first adding a `$` delimiter.
165+ pub fn push_base64 ( & mut self , field : & [ u8 ] , base64_encoding : Base64 ) {
165166 self . 0 . push ( fields:: DELIMITER ) ;
166- self . 0 . push_str ( field . as_str ( ) ) ;
167+ self . 0 . push_str ( & base64_encoding . encode_string ( field ) ) ;
167168 }
168169
169- /// Push an additional field onto the password hash string, adding a leading `$` and then
170- /// encoding it into the specified variant of Base64.
171- pub fn push_field_base64 ( & mut self , field : & [ u8 ] , base64_encoding : Base64 ) {
170+ /// Push an additional field onto the password hash string, first adding a `$` delimiter.
171+ pub fn push_field ( & mut self , field : Field < ' _ > ) {
172172 self . 0 . push ( fields:: DELIMITER ) ;
173- self . 0 . push_str ( & base64_encoding . encode_string ( field ) ) ;
173+ self . 0 . push_str ( field . as_str ( ) ) ;
174174 }
175175
176- /// Push a raw string onto the MCF hash, ensuring it validates as a [`Field`] and also
177- /// adding a leading `$` .
176+ /// Push a raw string onto the MCF hash, first adding a `$` delimiter and also ensuring it
177+ /// validates as a [`Field`] .
178178 ///
179179 /// # Errors
180180 /// - If the provided `str` fails to validate as a [`Field`] (i.e. contains characters
0 commit comments