@@ -44,7 +44,7 @@ public List<OssDto> getAllOssList() {
44
44
45
45
if ( !CollectionUtils .isEmpty (ossList ) ) {
46
46
ossList = ossList .stream ()
47
- .map (ossDto -> OssDto .withModifiedEncriptPassword (ossDto , encodingBase64String ( decryptAesString (ossDto .getOssPassword () ))))
47
+ .map (ossDto -> OssDto .setDecryptPassword (ossDto , decryptAesString (ossDto .getOssPassword ())))
48
48
.collect (Collectors .toList ());
49
49
}
50
50
@@ -77,7 +77,7 @@ public List<OssDto> getOssList(String ossTypeName) {
77
77
if ( !CollectionUtils .isEmpty (ossList ) ) {
78
78
ossList = ossList
79
79
.stream ()
80
- .map (ossDto -> OssDto .withModifiedEncriptPassword (ossDto , encodingBase64String ( decryptAesString (ossDto .getOssPassword () ))))
80
+ .map (ossDto -> OssDto .setDecryptPassword (ossDto , decryptAesString (ossDto .getOssPassword ())))
81
81
.collect (Collectors .toList ());
82
82
}
83
83
@@ -93,7 +93,7 @@ public List<OssDto> getOssList(String ossTypeName) {
93
93
@ Override
94
94
public Long registOss (OssDto ossDto ) {
95
95
OssTypeDto ossTypeDto = OssTypeDto .from (ossTypeRepository .findByOssTypeIdx (ossDto .getOssTypeIdx ()));
96
- ossDto = ossDto .withModifiedEncriptPassword (ossDto , encryptAesString (ossDto .getOssPassword ()));
96
+ ossDto = ossDto .setEncryptPassword (ossDto , encryptAesString (ossDto .getOssPassword ()));
97
97
ossDto = OssDto .from (ossRepository .save (OssDto .toEntity (ossDto , ossTypeDto )));
98
98
return ossDto .getOssIdx ();
99
99
}
@@ -107,7 +107,7 @@ public Long registOss(OssDto ossDto) {
107
107
public Long updateOss (OssDto ossDto ) {
108
108
OssTypeDto ossTypeDto = OssTypeDto .from (ossTypeRepository .findByOssTypeIdx (ossDto .getOssTypeIdx ()));
109
109
110
- ossDto = ossDto .withModifiedEncriptPassword (ossDto , encryptAesString (ossDto .getOssPassword ()));
110
+ ossDto = ossDto .setEncryptPassword (ossDto , encryptAesString (ossDto .getOssPassword ()));
111
111
ossRepository .save (OssDto .toEntity (ossDto , ossTypeDto ));
112
112
return ossDto .getOssIdx ();
113
113
}
@@ -150,7 +150,7 @@ public Boolean checkConnection(OssDto ossDto) {
150
150
}
151
151
152
152
// Front에서 Base64Encoding한 데이터를 복호화하여 AES256 암호화 함.
153
- ossDto .withModifiedEncriptPassword (ossDto , encryptAesString (ossDto .getOssPassword ()));
153
+ ossDto .setEncryptPassword (ossDto , encryptAesString (ossDto .getOssPassword ()));
154
154
return nexusService .checkNexusConnection (ossDto );
155
155
156
156
default :
@@ -173,7 +173,8 @@ public Boolean checkConnection(OssDto ossDto) {
173
173
*/
174
174
public OssDto detailOss (Long ossIdx ) {
175
175
Oss oss = ossRepository .findByOssIdx (ossIdx );
176
- return OssDto .withDetailDecryptPassword (oss , decryptAesString (oss .getOssPassword ()));
176
+ OssDto ossDto = OssDto .from (oss );
177
+ return OssDto .setDecryptPassword (ossDto , decryptAesString (oss .getOssPassword ()));
177
178
}
178
179
179
180
public OssDto detailOssByOssName (String ossName ) {
@@ -234,7 +235,7 @@ public String encryptBase64String(String str) {
234
235
*/
235
236
public String encryptAesString (String str ) {
236
237
if ( StringUtils .isNotBlank (str ) ) {
237
- return AES256Utils .encrypt (Base64Utils . base64Decoding ( str ) );
238
+ return AES256Utils .encrypt (str );
238
239
}
239
240
else {
240
241
return null ;
0 commit comments