1 | package org.cardanofoundation.explorer.api.config; | |
2 | ||
3 | import java.security.PublicKey; | |
4 | ||
5 | import jakarta.annotation.PostConstruct; | |
6 | ||
7 | import lombok.Getter; | |
8 | import lombok.Setter; | |
9 | ||
10 | import org.springframework.boot.context.properties.ConfigurationProperties; | |
11 | import org.springframework.stereotype.Component; | |
12 | ||
13 | import org.cardanofoundation.explorer.common.utils.RsaUtils; | |
14 | ||
15 | @Component | |
16 | @ConfigurationProperties("rsa.key") | |
17 | @Getter | |
18 | @Setter | |
19 | public class RsaConfig { | |
20 | ||
21 |
1
1. getPublicKeyStr : replaced return value with "" for org/cardanofoundation/explorer/api/config/RsaConfig::getPublicKeyStr → NO_COVERAGE |
private String publicKeyStr; |
22 | ||
23 |
1
1. getPublicKey : replaced return value with null for org/cardanofoundation/explorer/api/config/RsaConfig::getPublicKey → NO_COVERAGE |
private PublicKey publicKey; |
24 | ||
25 | @PostConstruct | |
26 | public void createRsaKey() { | |
27 | java.security.Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider()); | |
28 | publicKey = RsaUtils.getPublicKey(publicKeyStr); | |
29 | } | |
30 | } | |
Mutations | ||
21 |
1.1 |
|
23 |
1.1 |