Class CertificatePinner.Builder
java.lang.Object
cloud.opencode.base.crypto.ssl.CertificatePinner.Builder
- Enclosing class:
CertificatePinner
Builder for
CertificatePinner.
CertificatePinner 的构建器。- Since:
- JDK 25, opencode-base-crypto V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Method Summary
Modifier and TypeMethodDescriptionAdds a pin insha256/base64==format.Adds multiple pins.build()Builds theCertificatePinner.
-
Method Details
-
add
Adds a pin insha256/base64==format. 添加sha256/base64==格式的固定值。- Parameters:
pin- the pin string - 固定字符串- Returns:
- this builder - 此构建器
- Throws:
IllegalArgumentException- if the pin format is invalid - 如果格式无效
-
addAll
Adds multiple pins. 添加多个固定值。- Parameters:
pins- the pin strings - 固定字符串列表- Returns:
- this builder - 此构建器
-
build
Builds theCertificatePinner. 构建CertificatePinner。- Returns:
- the pinner - 固定器
- Throws:
IllegalStateException- if no pins have been added - 如果未添加任何固定值
-