Changeset 1261 for trunk


Ignore:
Timestamp:
03/19/19 10:46:51 (5 years ago)
Author:
bln4
Message:

Actions for Davids presentation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/auth/sharing/Actions.java

    r1260 r1261  
    4040                return AuthJoinSecret(key);
    4141        }
    42 
     42       
     43        public static void Encrypt(Text labelWithKey) {
     44                AuthEncrypt(labelWithKey);
     45        }
     46       
     47        public static void Decrypt(Text labelWithKey) {
     48                AuthDecrypt(labelWithKey);
     49        }
     50       
    4351        public static Text AuthGenerateSecret(String label) {
    4452                // Generate AES Key
     
    132140               
    133141                // Perform decryption
    134                 Frame toEncrypt = FrameIO.LoadFrame(labelWithKey.getLink());
    135                 Collection<Text> textItems = toEncrypt.getTextItems();
     142                Frame toDecrypt = FrameIO.LoadFrame(labelWithKey.getLink());
     143                Collection<Text> textItems = toDecrypt.getTextItems();
    136144                for (Text t: textItems) {
    137145                        byte[] decrypted = DecryptSymmetric(Base64.getDecoder().decode(t.getText().getBytes()), key);
    138146                        t.setText(new String(decrypted));
    139147                }
     148               
     149                // Save changes
     150                FrameIO.SaveFrame(toDecrypt);
    140151        }
    141152       
Note: See TracChangeset for help on using the changeset viewer.