Added PGP solution

This commit is contained in:
M66B
2023-02-28 12:46:34 +01:00
parent 6a41ed95c9
commit 273b05e7a1
2 changed files with 48 additions and 17 deletions

View File

@@ -135,6 +135,9 @@ public interface DaoIdentity {
@Query("UPDATE identity SET encrypt = :encrypt WHERE id = :id AND NOT (encrypt IS :encrypt)")
int setIdentityEncrypt(long id, int encrypt);
@Query("UPDATE identity SET sign_default = 0, encrypt_default = 0 WHERE encrypt = 0")
int resetIdentityPGP();
@Query("UPDATE identity SET sign_key = :sign_key WHERE id = :id AND NOT (sign_key IS :sign_key)")
int setIdentitySignKey(long id, Long sign_key);