File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ pub struct StorableBuilder {
1616const CHACHA20_CIPHER_NAME : & ' static str = "ChaCha20Poly1305" ;
1717
1818impl StorableBuilder {
19-
2019 /// Creates a [`Storable`] that can be serialized and stored as `value` in [`PutObjectRequest`].
2120 ///
2221 /// Uses ChaCha20 for encrypting the `input` and Poly1305 for generating mac/tag.
@@ -55,7 +54,8 @@ impl StorableBuilder {
5554 let mut cipher = ChaCha20Poly1305 :: new ( & self . data_encryption_key , & encryption_metadata. nonce , & [ ] ) ;
5655
5756 if cipher. decrypt_inplace ( & mut storable. data , encryption_metadata. tag . borrow ( ) ) {
58- let data_blob = PlaintextBlob :: decode ( & storable. data [ ..] ) . map_err ( |e| Error :: new ( ErrorKind :: InvalidData , e) ) ?;
57+ let data_blob =
58+ PlaintextBlob :: decode ( & storable. data [ ..] ) . map_err ( |e| Error :: new ( ErrorKind :: InvalidData , e) ) ?;
5959 Ok ( ( data_blob. value , data_blob. version ) )
6060 } else {
6161 Err ( Error :: new ( ErrorKind :: InvalidData , "Invalid Tag" ) )
You can’t perform that action at this time.
0 commit comments