File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
crates/bitwarden-crypto/src/enc_string Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -243,7 +243,8 @@ impl EncString {
243
243
let mut protected_header = coset:: HeaderBuilder :: new ( ) ;
244
244
match content_format {
245
245
ContentFormat :: Utf8 => {
246
- protected_header = protected_header. content_type ( "application/utf8-padded" . to_string ( ) ) ;
246
+ protected_header =
247
+ protected_header. content_type ( "application/utf8-padded" . to_string ( ) ) ;
247
248
}
248
249
ContentFormat :: Pkcs8 => {
249
250
protected_header = protected_header. content_format ( CoapContentFormat :: Pkcs8 ) ;
@@ -258,7 +259,7 @@ impl EncString {
258
259
ContentFormat :: DomainObject => unreachable ! ( ) ,
259
260
}
260
261
261
- let mut data = data_dec. to_vec ( ) ;
262
+ let mut data = data_dec. to_vec ( ) ;
262
263
if content_format != ContentFormat :: Utf8 {
263
264
// Pad the data to a block size in order to hide plaintext length
264
265
pad_bytes ( & mut data, Self :: XCHACHA20_TEXT_PAD_BLOCK_SIZE ) ;
@@ -359,7 +360,7 @@ impl KeyDecryptable<SymmetricCryptoKey, Vec<u8>> for EncString {
359
360
if content_type == "application/utf8-padded" {
360
361
decrypted_message = unpad_bytes ( & decrypted_message. as_slice ( ) ) . to_vec ( ) ;
361
362
} else {
362
- return Err ( CryptoError :: EncodingError )
363
+ return Err ( CryptoError :: EncodingError ) ;
363
364
}
364
365
}
365
366
_ => { }
You can’t perform that action at this time.
0 commit comments