密钥恢复
This commit is contained in:
+1
-1
@@ -52,7 +52,7 @@ public class KeyInfoAsymController {
|
||||
*/
|
||||
@PostMapping("/backup")
|
||||
public ResponseEntity<org.springframework.core.io.Resource> backupKey(@Valid @RequestBody KeyInfoDTO.Backup backup) {
|
||||
backup.setKeyType(KeyCategory.SYM_KEY.getCode());
|
||||
backup.setKeyType(KeyCategory.ASYM_KEY.getCode());
|
||||
byte[] content = keyInfoService.backupKey(backup);
|
||||
|
||||
String fileName = String.join("-",
|
||||
|
||||
@@ -78,7 +78,7 @@ public class KeyInfoController {
|
||||
@PostMapping("/recovery")
|
||||
public R<String> recoveryKey(MultipartFile file) {
|
||||
try {
|
||||
String s = keyInfoService.recoveryKey(file.getBytes());
|
||||
String s = keyInfoService.recoveryKey(file.getInputStream());
|
||||
return R.ok(s);
|
||||
} catch (IOException e) {
|
||||
throw new SspwebException("获取文件内容异常");
|
||||
|
||||
Reference in New Issue
Block a user