Package com.google.crypto.tink.signature
Class SignaturePemKeysetReader.Builder
- java.lang.Object
-
- com.google.crypto.tink.signature.SignaturePemKeysetReader.Builder
-
- Enclosing class:
- SignaturePemKeysetReader
public static final class SignaturePemKeysetReader.Builder extends java.lang.ObjectBuilder for SignaturePemKeysetReader
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description SignaturePemKeysetReader.BuilderaddPem(java.lang.String pem, PemKeyType keyType)Adds a PEM.KeysetReaderbuild()Deprecated.UsebuildPublicKeysetHandle()instead.KeysetHandlebuildPublicKeysetHandle()Builds aKeysetHandlefrom the public PEM keys added to thisSignaturePemKeysetReader.Builder.
-
-
-
Method Detail
-
buildPublicKeysetHandle
public KeysetHandle buildPublicKeysetHandle() throws java.security.GeneralSecurityException
Builds aKeysetHandlefrom the public PEM keys added to thisSignaturePemKeysetReader.Builder.The first key in the first added PEM is the primary key.
Warning: Private keys and invalid, incompatible or unparsable keys are silently ignored, without throwing an exception. This only throws an exception if no keys are found at all.
- Throws:
java.security.GeneralSecurityException
-
build
@Deprecated public KeysetReader build()
Deprecated.UsebuildPublicKeysetHandle()instead.Builds aKeysetReaderfrom the PEM keys added to thisSignaturePemKeysetReader.Builder.
-
addPem
@CanIgnoreReturnValue public SignaturePemKeysetReader.Builder addPem(java.lang.String pem, PemKeyType keyType)
Adds a PEM.A single PEM can contain multiple keys, but all must have the same
keyType. Invalid or unparsable keys are ignored.The first key in the first added PEM is the primary key.
-
-