@Override public String decrypt(String str) throws SecDispatcherException { if (!isEncryptedString(str)) { return str; } String bare = null; try { bare = cipher.unDecorate(str); } catch (PlexusCipherException e1) { throw new SecDispatcherException(e1); } Map<String, String> attr = stripAttributes(bare); String res = null; if (attr == null || attr.get("type") == null) { String master = getMaster(); try { res = cipher.decrypt(bare, master); } catch (PlexusCipherException e) { throw new SecDispatcherException("Unable to decrypt encrypted string", e); } } else { String type = (String) attr.get(TYPE_ATTR); throw new UnsupportedOperationException("Unable to lookup security dispatched of type " + type); } return res; }
@Override public String decrypt(String str) throws SecDispatcherException { if (!isEncryptedString(str)) { return str; } String bare = null; try { bare = cipher.unDecorate(str); } catch (PlexusCipherException e1) { throw new SecDispatcherException(e1); } Map<String, String> attr = stripAttributes(bare); String res = null; if (attr == null || attr.get("type") == null) { String master = getMaster(); try { res = cipher.decrypt(bare, master); } catch (PlexusCipherException e) { throw new SecDispatcherException("Unable to decrypt encrypted string", e); } } else { String type = (String) attr.get(TYPE_ATTR); throw new UnsupportedOperationException("Unable to lookup security dispatched of type " + type); } return res; }
@Override public String decrypt(String str) throws SecDispatcherException { if (!isEncryptedString(str)) { return str; } String bare = null; try { bare = cipher.unDecorate(str); } catch (PlexusCipherException e1) { throw new SecDispatcherException(e1); } Map<String, String> attr = stripAttributes(bare); String res = null; if (attr == null || attr.get("type") == null) { String master = getMaster(); try { res = cipher.decrypt(bare, master); } catch (PlexusCipherException e) { throw new SecDispatcherException("Unable to decrypt encrypted string", e); } } else { String type = (String) attr.get(TYPE_ATTR); throw new UnsupportedOperationException("Unable to lookup security dispatched of type " + type); } return res; }
res = _cipher.decrypt( bare, master );