[cxf] branch master updated: [CXF-8338] Add missing getters to JweJsonConsumer (#693)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[cxf] branch master updated: [CXF-8338] Add missing getters to JweJsonConsumer (#693)

coheigea
Administrator
This is an automated email from the ASF dual-hosted git repository.

coheigea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git


The following commit(s) were added to refs/heads/master by this push:
     new 65d7db9  [CXF-8338] Add missing getters to JweJsonConsumer (#693)
65d7db9 is described below

commit 65d7db982de6e8ba7d0e49807577b31f2828814b
Author: Joachim Beckers <[hidden email]>
AuthorDate: Wed Sep 16 15:48:17 2020 +0200

    [CXF-8338] Add missing getters to JweJsonConsumer (#693)
   
    Co-authored-by: Joachim Beckers <[hidden email]>
---
 .../cxf/rs/security/jose/jwe/JweJsonConsumer.java  | 31 ++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweJsonConsumer.java b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweJsonConsumer.java
index 99db56e..5111d5d 100644
--- a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweJsonConsumer.java
+++ b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweJsonConsumer.java
@@ -189,6 +189,37 @@ public class JweJsonConsumer {
         }
         return new String(aad, StandardCharsets.UTF_8);
     }
+
+    public byte[] getIvBytes() {
+        return iv;
+    }
+    public String getIvText() {
+        if (iv == null) {
+            return null;
+        }
+        return new String(iv, StandardCharsets.UTF_8);
+    }
+
+    public byte[] getCipherBytes() {
+        return cipherBytes;
+    }
+    public String getCipherText() {
+        if (cipherBytes == null) {
+            return null;
+        }
+        return new String(cipherBytes, StandardCharsets.UTF_8);
+    }
+
+    public byte[] getAuthTagBytes() {
+        return authTag;
+    }
+    public String getAuthTagText() {
+        if (authTag == null) {
+            return null;
+        }
+        return new String(authTag, StandardCharsets.UTF_8);
+    }
+
     public List<JweJsonEncryptionEntry> getRecipients() {
         return recipients;
     }