File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -175,6 +175,21 @@ mod tests {
175175		) ; 
176176	} 
177177
178+ 	#[ test]  
179+ 	fn  deobfuscate_v031_key ( )  { 
180+ 		// This test ensures backward compatibility with v0.3.1 obfuscated keys. 
181+ 		// The obfuscated key was generated using v0.3.1 with: 
182+ 		// - obfuscation_master_key: [0xAB; 32] 
183+ 		// - original key: "my_storage_key_v031_compat" 
184+ 		let  obfuscation_master_key = [ 0xAB ;  32 ] ; 
185+ 		let  key_obfuscator = KeyObfuscator :: new ( obfuscation_master_key) ; 
186+ 
187+ 		let  v031_obfuscated_key = "nxrixRQPGawY+a9JFLThii0RgeADtEdSjh2YDgpZhBKOuw6GKr5UAIIwsQCathJlZsmuSku+RGB1/JuxFUMQGoAwa+M8tg" ; 
188+ 
189+ 		let  deobfuscated_key = key_obfuscator. deobfuscate ( v031_obfuscated_key) . unwrap ( ) ; 
190+ 		assert_eq ! ( deobfuscated_key,  "my_storage_key_v031_compat" ) ; 
191+ 	} 
192+ 
178193	use  proptest:: prelude:: * ; 
179194
180195	proptest !  { 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments