我将 encrypted_moor 与 sqlite3_flutter_libs 一起用于我的加密数据库。更新软件包并启用空安全性后,我的旧加密数据库总是因错误而失败。
E/Finsky: [13903] aerc.b(3): Error while reading encrypted model
java.security.GeneralSecurityException: decryption failed
at aofr.a(PG:7)
at aerc.b(PG:2)
at aepd.apply(Unknown Source:3)
at j$.util.Optional.map(Optional.java:265)
at aeqa.(PG:6)
at adzi.apply(Unknown Source:3)
at j$.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
at j$.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
at j$.util.AbstractList$RandomAccessSpliterator.forEachRemaining(AbstractList.java:720)
at j$.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at j$.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at j$.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
at j$.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:132)
at j$.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at j$.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
at adzu.a(PG:13)
at aedr.a(Unknown Source:38)
at aoaz.c(PG:2)
at aobb.run(PG:9)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at lbm.run(PG:13)
at java.lang.Thread.run(Thread.java:923)
稍后在使用执行器时:
SqliteException(26): file is not a database, file is not a database (code 26)
throwException
我看到 encrypted_moor 使用的 sqlchiper 包已将其 SQL 密码更新到版本 4。为了解决这个问题,我在我的 Pragma 调用中添加了 rawDb.execute("PRAGMA cipher_compatibility=3;" 但它似乎不起作用。
VmDatabase(
file,
setup: (rawDb) {
rawDb.execute("PRAGMA key = '$key';");
rawDb.execute("PRAGMA cipher_compatibility=3;");
},
);
有谁知道哪里出了问题?