Class COSEHeaderBuilder<TBuilder extends COSEHeaderBuilder<TBuilder,THeader>,THeader>
java.lang.Object
com.authlete.cose.COSEHeaderBuilder<TBuilder,THeader>
- Type Parameters:
TBuilder- The type of the subclass. EitherCOSEProtectedHeaderBuilderorCOSEUnprotectedHeaderBuilder.THeader- The type of the header to build. EitherCOSEProtectedHeaderorCOSEUnprotectedHeader.
- Direct Known Subclasses:
COSEProtectedHeaderBuilder,COSEUnprotectedHeaderBuilder
public abstract class COSEHeaderBuilder<TBuilder extends COSEHeaderBuilder<TBuilder,THeader>,THeader>
extends Object
The base class for
COSEProtectedHeaderBuilder and
COSEUnprotectedHeaderBuilder.- Since:
- 1.1
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionalg(int alg) Set the "alg (1)" parameter.Set the "alg (1)" parameter.Set the "alg (1)" parameter.build()Build a header instance.contentType(int contentType) Set the "content type (3)" parameter.contentType(String contentType) Set the "content type (3)" parameter.Set the "crit (2)" parameter.iv(byte[] iv) Set the "IV (5)" parameter.kid(byte[] kid) Set the "kid (4)" parameter.Set the "kid (4)" parameter.partialIv(byte[] partialIv) Set the "Partial IV (6)" parameter.Set a parameter.x5chain(List<X509Certificate> chain) Set the "x5chain (33)" parameter.
-
Constructor Details
-
COSEHeaderBuilder
public COSEHeaderBuilder()
-
-
Method Details
-
put
-
alg
Set the "alg (1)" parameter.- Parameters:
alg- An identifier assigned to an algorithm.- Returns:
thisobject.- See Also:
-
alg
-
alg
-
crit
-
contentType
-
contentType
Set the "content type (3)" parameter.- Parameters:
contentType- The content type.- Returns:
thisobject.
-
kid
Set the "kid (4)" parameter.- Parameters:
kid- The key ID.- Returns:
thisobject.
-
kid
-
iv
Set the "IV (5)" parameter.- Parameters:
iv- The full initialization vector.- Returns:
thisobject.
-
partialIv
Set the "Partial IV (6)" parameter.- Parameters:
partialIv- The partial initialization vector.- Returns:
thisobject.
-
x5chain
Set the "x5chain (33)" parameter.- Parameters:
chain- The certificate chain.- Returns:
thisobject.- Throws:
CertificateEncodingException- Since:
- 1.5
- See Also:
-
build
Build a header instance.- Returns:
- An instance of either
COSEProtectedHeaderorCOSEUnprotectedHeader.
-