//Kiểm tra Bản Quyền Số của một file .wav bất kỳ từ máy public static string Check(HttpPostedFileBase file) { if (file != null && file.ContentLength > 0) { Google.Apis.Drive.v3.DriveService service = GetService(); string path = Path.Combine(HttpContext.Current.Server.MapPath("~"), Path.GetFileName(file.FileName)); file.SaveAs(path); String signature = ""; WaveSteg filess = new WaveSteg(new FileStream(path, FileMode.Open, FileAccess.Read)); StagnoHelper sh = new StagnoHelper(filess); signature = sh.ExtractMessage(); return(signature); } return(""); }
//Khởi tạo StagnoHelper public StagnoHelper(WaveSteg file) { this.file = file; }