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. EitherCOSEProtectedHeaderBuilder
orCOSEUnprotectedHeaderBuilder
.THeader
- The type of the header to build. EitherCOSEProtectedHeader
orCOSEUnprotectedHeader
.
- 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:
this
object.- See Also:
-
alg
-
alg
-
crit
-
contentType
-
contentType
Set the "content type (3)" parameter.- Parameters:
contentType
- The content type.- Returns:
this
object.
-
kid
Set the "kid (4)" parameter.- Parameters:
kid
- The key ID.- Returns:
this
object.
-
kid
-
iv
Set the "IV (5)" parameter.- Parameters:
iv
- The full initialization vector.- Returns:
this
object.
-
partialIv
Set the "Partial IV (6)" parameter.- Parameters:
partialIv
- The partial initialization vector.- Returns:
this
object.
-
x5chain
Set the "x5chain (33)" parameter.- Parameters:
chain
- The certificate chain.- Returns:
this
object.- Throws:
CertificateEncodingException
- Since:
- 1.5
- See Also:
-
build
Build a header instance.- Returns:
- An instance of either
COSEProtectedHeader
orCOSEUnprotectedHeader
.
-