Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Sleuthkit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IRT
Sleuthkit
Commits
62e20d85
Commit
62e20d85
authored
11 years ago
by
Richard Cordovano
Committed by
APriestman
11 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add interface of addToHashDatabase() API to SleuthkitJNI
parent
4605a5c8
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bindings/java/src/org/sleuthkit/datamodel/HashEntry.java
+59
-0
59 additions, 0 deletions
bindings/java/src/org/sleuthkit/datamodel/HashEntry.java
bindings/java/src/org/sleuthkit/datamodel/SleuthkitJNI.java
+9
-1
9 additions, 1 deletion
bindings/java/src/org/sleuthkit/datamodel/SleuthkitJNI.java
with
68 additions
and
1 deletion
bindings/java/src/org/sleuthkit/datamodel/HashEntry.java
0 → 100755
+
59
−
0
View file @
62e20d85
/*
* Sleuth Kit Data Model
*
* Copyright 2014 Basis Technology Corp.
* Contact: carrier <at> sleuthkit <dot> org
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
org.sleuthkit.datamodel
;
/**
* Used to pass hashDb information about a particular file from TSK to Autopsy
*/
public
class
HashEntry
{
private
String
md5Hash
;
private
String
sha1Hash
;
private
String
sha256Hash
;
private
String
fileName
;
private
String
comment
;
public
HashEntry
(
String
fileName
,
String
md5Hash
,
String
sha1Hash
,
String
sha256Hash
,
String
comment
)
{
this
.
fileName
=
fileName
;
this
.
md5Hash
=
md5Hash
;
this
.
sha1Hash
=
sha1Hash
;
this
.
sha256Hash
=
sha256Hash
;
this
.
comment
=
comment
;
}
public
String
getMd5Hash
()
{
return
md5Hash
;
}
public
String
getSha1Hash
()
{
return
sha1Hash
;
}
public
String
getSha256Hash
()
{
return
sha256Hash
;
}
public
String
getFileName
()
{
return
fileName
;
}
public
String
getComment
()
{
return
comment
;
}
}
This diff is collapsed.
Click to expand it.
bindings/java/src/org/sleuthkit/datamodel/SleuthkitJNI.java
+
9
−
1
View file @
62e20d85
...
...
@@ -21,6 +21,7 @@
import
java.text.DateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.GregorianCalendar
;
import
java.util.List
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.TimeZone
;
...
...
@@ -686,7 +687,14 @@ public static void addToHashDatabase(String filename, String md5, String sha1, S
hashDbAddEntryNat
(
filename
,
md5
,
sha1
,
sha256
,
comment
,
dbHandle
);
}
public
static
void
addToHashDatabase
(
List
<
HashEntry
>
hashes
,
int
dbHandle
)
throws
TskCoreException
{
// RJCTODO: Begin transaction
for
(
HashEntry
entry
:
hashes
)
{
hashDbAddEntryNat
(
entry
.
getFileName
(),
entry
.
getMd5Hash
(),
entry
.
getSha1Hash
(),
entry
.
getSha256Hash
(),
entry
.
getComment
(),
dbHandle
);
}
// RJCTODO: end transaction
}
public
static
boolean
isUpdateableHashDatabase
(
int
dbHandle
)
throws
TskCoreException
{
return
hashDbIsUpdateableNat
(
dbHandle
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment