@@ -233,10 +233,22 @@ impl<T: TlsUsage> EnvOpenOptions<T> {
233233 /// [^7]: <https://github.com/LMDB/lmdb/blob/b8e54b4c31378932b69f1298972de54a565185b1/libraries/liblmdb/lmdb.h#L102-L105>
234234 /// [^8]: <http://www.lmdb.tech/doc/index.html>
235235 pub unsafe fn open < P : AsRef < Path > > ( & self , path : P ) -> Result < Env < T > > {
236- self . raw_open_with_encryption (
236+ self . raw_open_with_checksum_and_encryption (
237237 path. as_ref ( ) ,
238238 #[ cfg( master3) ]
239239 None ,
240+ #[ cfg( master3) ]
241+ None ,
242+ )
243+ }
244+
245+ pub unsafe fn open_checksummed < P : AsRef < Path > > ( & self , path : P ) -> Result < Env < T > > {
246+ self . raw_open_with_checksum_and_encryption (
247+ path. as_ref ( ) ,
248+ #[ cfg( master3) ]
249+ None ,
250+ #[ cfg( master3) ]
251+ None ,
240252 )
241253 }
242254
@@ -390,16 +402,18 @@ impl<T: TlsUsage> EnvOpenOptions<T> {
390402 E : AeadMutInPlace + KeyInit ,
391403 P : AsRef < Path > ,
392404 {
393- self . raw_open_with_encryption (
405+ self . raw_open_with_checksum_and_encryption (
394406 path. as_ref ( ) ,
407+ None ,
395408 Some ( ( Some ( encrypt_func_wrapper :: < E > ) , & key, <E as AeadCore >:: TagSize :: U32 ) ) ,
396409 )
397410 . map ( |inner| EncryptedEnv { inner } )
398411 }
399412
400- fn raw_open_with_encryption (
413+ fn raw_open_with_checksum_and_encryption (
401414 & self ,
402415 path : & Path ,
416+ #[ cfg( master3) ] sum : Option < ( ffi:: MDB_sum_func , u32 ) > ,
403417 #[ cfg( master3) ] enc : Option < ( ffi:: MDB_enc_func , & [ u8 ] , u32 ) > ,
404418 ) -> Result < Env < T > > {
405419 let mut lock = OPENED_ENV . write ( ) . unwrap ( ) ;
0 commit comments