diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/src/ch/asynk/rustanddust/util/DB.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/src/ch/asynk/rustanddust/util/DB.java b/core/src/ch/asynk/rustanddust/util/DB.java index 18ee162..df2a64c 100644 --- a/core/src/ch/asynk/rustanddust/util/DB.java +++ b/core/src/ch/asynk/rustanddust/util/DB.java @@ -121,6 +121,14 @@ public class DB return hash; } + private boolean checkDigest(String what, int id, String payload, String digest) + { + if (digest.equals(getDigest(payload))) + return true; + RustAndDust.error(String.format("corrupted %s(%d)", what, id)); + return false; + } + private static final String CHECK_VERSION = "select (value=%d) from config where key='version';"; public Boolean checkVersion() |