sdckey

Evidence File Encryption

Oct 8th, 2018
95
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class MainClass {
  2. void Main(CaseClass c) {
  3. SystemClass::ClearConsole(1);
  4. long offset, size;
  5. if (EntryClass e = EntryClass::TypeCast(c.GetCurrentItem(offset, size)))
  6. {
  7. LogicalEvidenceFileClass lef();
  8. CredentialClass credsRoot(); // The root object in a list of credentials
  9. credsRoot.SetEncryptionType(EV2); // This isn't optional
  10. credsRoot.SetSelected(true);
  11. CredentialClass key_cred(credsRoot);
  12. key_cred.SetEncryptionType(EV2);
  13. key_cred.SetPassword("Password12345");
  14.  
  15.  
  16. EvidenceFileClass ev();
  17. ev.SetCompression(EvidenceFileClass::COMPRESSBEST); // COMPRESSNONE | COMPRESSBEST | COMPRESSFAST
  18. ev.SetEncryption(AES_256);
  19. if (lef.Open("C:\\Test_2.Lx01", LEF2 | DELETEONCLOSEIFEMPTY, ev, credsRoot))
  20. {
  21. LogicalEvidenceFileClass::DataClass data();
  22. data.SetTarget(e, MODEENTRY);
  23. if (lef.Add(data))
  24. {
  25. lef.Close();
  26. Console.WriteLine("Success");
  27. }
  28. }
  29. }
  30. }
  31. }
RAW Paste Data