Produced by Araxis Merge on 7/10/2017 1:01:43 PM Central Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | C:\AraxisMergeCompare\Pri_un\IV-ehmp_cif\ImagingCommon\main\src\java\gov\va\med\imaging\facade\configuration | EncryptedConfigurationPropertyStringSingleValueConverter.java | Thu Jun 29 17:22:59 2017 UTC |
| 2 | C:\AraxisMergeCompare\Pri_re\IV-ehmp_cif\ImagingCommon\main\src\java\gov\va\med\imaging\facade\configuration | EncryptedConfigurationPropertyStringSingleValueConverter.java | Thu Jul 6 15:02:28 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 3 | 180 |
| Changed | 2 | 4 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| Whitespace | |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
| 1 | /** | |
| 2 | * | |
| 3 | Package: MAG - Vis tA Imaging | |
| 4 | WARNING: Per VHA D irective 2 004-038, t his routin e should n ot be modi fied. | |
| 5 | Date Cre ated: Apr 25, 2012 | |
| 6 | Site Nam e: Washin gton OI Fi eld Office , Silver S pring, MD | |
| 7 | Developer:
|
|
| 8 | Descript ion: | |
| 9 | ||
| 10 | ;; +-------- ---------- ---------- ---------- ---------- ---------- ---------- + | |
| 11 | ;; Property of the US Government . | |
| 12 | ;; No permis sion to co py or redi stribute t his softwa re is give n. | |
| 13 | ;; Use of un released v ersions of this soft ware requi res the us er | |
| 14 | ;; to execu te a writt en test ag reement wi th the Vis tA Imaging | |
| 15 | ;; Developm ent Office of the De partment o f Veterans Affairs, | |
| 16 | ;; telephon e (301) 73 4-0100. | |
| 17 | ;; | |
| 18 | ;; The Food and Drug A dministrat ion classi fies this software a s | |
| 19 | ;; a Class I I medical device. A s such, it may not b e changed | |
| 20 | ;; in any wa y. Modifi cations to this soft ware may r esult in a n | |
| 21 | ;; adulterat ed medical device un der 21CFR8 20, the us e of which | |
| 22 | ;; is consid ered to be a violati on of US F ederal Sta tutes. | |
| 23 | ;; +-------- ---------- ---------- ---------- ---------- ---------- ---------- + | |
| 24 | ||
| 25 | */ | |
| 26 | package go v.va.med.i maging.fac ade.config uration; | |
| 27 | ||
| 28 | import org .apache.lo g4j.Logger ; | |
| 29 | ||
| 30 | import gov .va.med.im aging.encr yption.Aes Encryption ; | |
| 31 | import gov .va.med.im aging.encr yption.exc eptions.Ae sEncryptio nException ; | |
| 32 | ||
| 33 | import com .thoughtwo rks.xstrea m.converte rs.SingleV alueConver ter; | |
| 34 | ||
| 35 | /** | |
| 36 | * @author
|
|
| 37 | * | |
| 38 | */ | |
| 39 | public cla ss Encrypt edConfigur ationPrope rtyStringS ingleValue Converter | |
| 40 | implements SingleVal ueConverte r | |
| 41 | { | |
| 42 | pr ivate fina l static L ogger logg er = Logge r.getLogge r(Encrypte dConfigura tionProper tyStringSi ngleValueC onverter.c lass); | |
| 43 | ||
| 44 | /* (non-Java doc) | |
| 45 | * @see com. thoughtwor ks.xstream .converter s.Converte rMatcher#c anConvert( java.lang. Class) | |
| 46 | * / | |
| 47 | @S uppressWar nings("raw types") | |
| 48 | @O verride | |
| 49 | pu blic boole an canConv ert(Class type) | |
| 50 | { | |
| 51 | retu rn type.eq uals(Encry ptedConfig urationPro pertyStrin g.class); | |
| 52 | } | |
| 53 | ||
| 54 | /* (non-Java doc) | |
| 55 | * @see com. thoughtwor ks.xstream .converter s.SingleVa lueConvert er#fromStr ing(java.l ang.String ) | |
| 56 | * / | |
| 57 | @O verride | |
| 58 | pu blic Objec t fromStri ng(String arg0) | |
| 59 | { | |
| 60 | Stri ng decrypt edString = null; | |
| 61 | if(a rg0 == nul l) | |
| 62 | return null; | |
| 63 | try | |
| 64 | { | |
| 65 | decryp tedString = AesEncry ption.deco deByteArra y(arg0); | |
| 66 | } | |
| 67 | catc h(AesEncry ptionExcep tion aesX) | |
| 68 | { | |
| 69 | logger .error("Er ror decryt ping strin g, " + aes X.getMessa ge()); | |
| 70 | } | |
| 71 | retu rn new Enc ryptedConf igurationP ropertyStr ing(decryp tedString) ; | |
| 72 | } | |
| 73 | ||
| 74 | /* (non-Java doc) | |
| 75 | * @see com. thoughtwor ks.xstream .converter s.SingleVa lueConvert er#toStrin g(java.lan g.Object) | |
| 76 | * / | |
| 77 | @O verride | |
| 78 | pu blic Strin g toString (Object ar g0) | |
| 79 | { | |
| 80 | Encr yptedConfi gurationPr opertyStri ng encrypt edProperty = (Encryp tedConfigu rationProp ertyString )arg0; | |
| 81 | try | |
| 82 | { | |
| 83 | return AesEncryp tion.encry pt(encrypt edProperty .getValue( )); | |
| 84 | } | |
| 85 | catc h(AesEncry ptionExcep tion aesX) | |
| 86 | { | |
| 87 | logger .error("Er ror encryp ting strin g [" + enc ryptedProp erty.getVa lue() + "] , " + aesX .getMessag e()); | |
| 88 | } | |
| 89 | retu rn null; | |
| 90 | } | |
| 91 | ||
| 92 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.