mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-11 05:19:00 +08:00
🎨 改进结构和代码格式,删除无用引入等
This commit is contained in:
1 parent
bebd701981
commit
07fa29e4c6
8 files changed
+6
-11
No files matched your search
+3
-3
@@ -35,10 +35,10 @@ import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.util.UriComponentsBuilder;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
import javax.crypto.Cipher;
|
||||
import javax.crypto.spec.IvParameterSpec;
|
||||
import javax.crypto.spec.SecretKeySpec;
|
||||
import java.net.URI;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
@@ -59,8 +59,8 @@ public class PasswordDecoderFilter extends AbstractGatewayFilterFactory {
|
||||
AES aes = new AES(Mode.CBC,Padding.NoPadding,
|
||||
new SecretKeySpec(pass.getBytes(), KEY_ALGORITHM),
|
||||
new IvParameterSpec(pass.getBytes()));
|
||||
byte[] result = aes.decrypt(Base64.decode(data.getBytes(CharsetUtil.UTF_8)));
|
||||
return new String(result, CharsetUtil.UTF_8);
|
||||
byte[] result = aes.decrypt(Base64.decode(data.getBytes(StandardCharsets.UTF_8)));
|
||||
return new String(result, StandardCharsets.UTF_8);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user