diff options
Diffstat (limited to 'cadi/core/src/test')
-rw-r--r-- | cadi/core/src/test/java/org/onap/aaf/cadi/lur/test/JU_LocalLur.java | 16 | ||||
-rw-r--r-- | cadi/core/src/test/resources/output_key | 1 |
2 files changed, 14 insertions, 3 deletions
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/lur/test/JU_LocalLur.java b/cadi/core/src/test/java/org/onap/aaf/cadi/lur/test/JU_LocalLur.java index fd8e3575..50933f4e 100644 --- a/cadi/core/src/test/java/org/onap/aaf/cadi/lur/test/JU_LocalLur.java +++ b/cadi/core/src/test/java/org/onap/aaf/cadi/lur/test/JU_LocalLur.java @@ -47,12 +47,24 @@ public class JU_LocalLur { @Test public void test() throws IOException { - Symm symmetric = Symm.baseCrypt().obtain(); + final Symm symmetric = Symm.baseCrypt().obtain(); LocalLur up; ByteArrayOutputStream baos = new ByteArrayOutputStream(); baos.write(Symm.ENC.getBytes()); symmetric.enpass("<pass>", baos); - PropAccess ta = new PropAccess(); + PropAccess ta = new PropAccess() { + @Override + public String decrypt(String encrypted, boolean anytext) throws IOException { + return symmetric.depass(encrypted); + } + + @Override + public String encrypt(String unencrypted) throws IOException { + return symmetric.enpass(unencrypted); + } + + }; + Lur ml = up = new LocalLur(ta,"myname:groupA,groupB","admin:myname,yourname;suser:hisname,hername,m1234%"+baos.toString()); diff --git a/cadi/core/src/test/resources/output_key b/cadi/core/src/test/resources/output_key deleted file mode 100644 index 9d94dcbd..00000000 --- a/cadi/core/src/test/resources/output_key +++ /dev/null @@ -1 +0,0 @@ -QRSTUVWXYZabcdef
\ No newline at end of file |