jinlin
2024-06-24 3ca8ce266bf5b06556d80c78b31405e7a54aa4e5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package com.zt.modules.oss.encry;
 
import cn.hutool.core.io.IoUtil;
import com.zt.core.oss.encry.IOssEncryptService;
import org.springframework.stereotype.Service;
 
import java.io.File;
import java.io.InputStream;
 
@Service("noEncryptService")
public class NoEncryptService implements IOssEncryptService {
 
    public InputStream encrypt(InputStream inputStream) {
        return inputStream;
    }
 
    public InputStream decrypt(File file) {
        return IoUtil.toStream(file);
    }
 
}