You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2020/04/09 16:28:22 UTC
[couchdb] 01/02: Add helper for not_found
This is an automated email from the ASF dual-hosted git repository.
davisp pushed a commit to branch davisp-aegis
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 464ca64193fbcebae1fe194f2e0726a33619e9a7
Author: Paul J. Davis <pa...@gmail.com>
AuthorDate: Thu Apr 9 11:27:40 2020 -0500
Add helper for not_found
---
src/aegis/src/aegis.erl | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/aegis/src/aegis.erl b/src/aegis/src/aegis.erl
index 9b4778d..b27f32a 100644
--- a/src/aegis/src/aegis.erl
+++ b/src/aegis/src/aegis.erl
@@ -89,6 +89,9 @@ encrypt(#{} = Db, Key, Value) ->
<<1:8, CipherTag:128, CipherText/binary>>.
+decrypt(#{} = Db, Key, not_found) ->
+ not_found;
+
decrypt(#{} = Db, Key, Value) when is_binary(Key), is_binary(Value) ->
#{
aegis_ctx = Ctx,