Class JsonWebKey
java.lang.Object
com.azure.resourcemanager.attestation.models.JsonWebKey
The JsonWebKey model.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionalg()
Get the alg property: The "alg" (algorithm) parameter identifies the algorithm intended for use with the key.crv()
Get the crv property: The "crv" (curve) parameter identifies the curve type.d()
Get the d property: RSA private exponent or ECC private key.dp()
Get the dp property: RSA Private Key Parameter.dq()
Get the dq property: RSA Private Key Parameter.e()
Get the e property: RSA public exponent, in Base64.k()
Get the k property: Symmetric key.kid()
Get the kid property: The "kid" (key ID) parameter is used to match a specific key.kty()
Get the kty property: The "kty" (key type) parameter identifies the cryptographic algorithm family used with the key, such as "RSA" or "EC".n()
Get the n property: RSA modulus, in Base64.p()
Get the p property: RSA secret prime.q()
Get the q property: RSA secret prime, with p < q.qi()
Get the qi property: RSA Private Key Parameter.use()
Get the use property: Use ("public key use") identifies the intended use of the public key.void
validate()
Validates the instance.Set the alg property: The "alg" (algorithm) parameter identifies the algorithm intended for use with the key.Set the crv property: The "crv" (curve) parameter identifies the curve type.Set the d property: RSA private exponent or ECC private key.Set the dp property: RSA Private Key Parameter.Set the dq property: RSA Private Key Parameter.Set the e property: RSA public exponent, in Base64.Set the k property: Symmetric key.Set the kid property: The "kid" (key ID) parameter is used to match a specific key.Set the kty property: The "kty" (key type) parameter identifies the cryptographic algorithm family used with the key, such as "RSA" or "EC".Set the n property: RSA modulus, in Base64.Set the p property: RSA secret prime.Set the q property: RSA secret prime, with p < q.Set the qi property: RSA Private Key Parameter.Set the use property: Use ("public key use") identifies the intended use of the public key.Set the x property: X coordinate for the Elliptic Curve point.Set the x5C property: The "x5c" (X.509 certificate chain) parameter contains a chain of one or more PKIX certificates [RFC5280].Set the y property: Y coordinate for the Elliptic Curve point.x()
Get the x property: X coordinate for the Elliptic Curve point.x5C()
Get the x5C property: The "x5c" (X.509 certificate chain) parameter contains a chain of one or more PKIX certificates [RFC5280].y()
Get the y property: Y coordinate for the Elliptic Curve point.
-
Constructor Details
-
JsonWebKey
public JsonWebKey()Creates an instance of JsonWebKey class.
-
-
Method Details
-
alg
Get the alg property: The "alg" (algorithm) parameter identifies the algorithm intended for use with the key. The values used should either be registered in the IANA "JSON Web Signature and Encryption Algorithms" registry established by [JWA] or be a value that contains a Collision- Resistant Name.- Returns:
- the alg value.
-
withAlg
Set the alg property: The "alg" (algorithm) parameter identifies the algorithm intended for use with the key. The values used should either be registered in the IANA "JSON Web Signature and Encryption Algorithms" registry established by [JWA] or be a value that contains a Collision- Resistant Name.- Parameters:
alg
- the alg value to set.- Returns:
- the JsonWebKey object itself.
-
crv
Get the crv property: The "crv" (curve) parameter identifies the curve type.- Returns:
- the crv value.
-
withCrv
Set the crv property: The "crv" (curve) parameter identifies the curve type.- Parameters:
crv
- the crv value to set.- Returns:
- the JsonWebKey object itself.
-
d
Get the d property: RSA private exponent or ECC private key.- Returns:
- the d value.
-
withD
Set the d property: RSA private exponent or ECC private key.- Parameters:
d
- the d value to set.- Returns:
- the JsonWebKey object itself.
-
dp
Get the dp property: RSA Private Key Parameter.- Returns:
- the dp value.
-
withDp
Set the dp property: RSA Private Key Parameter.- Parameters:
dp
- the dp value to set.- Returns:
- the JsonWebKey object itself.
-
dq
Get the dq property: RSA Private Key Parameter.- Returns:
- the dq value.
-
withDq
Set the dq property: RSA Private Key Parameter.- Parameters:
dq
- the dq value to set.- Returns:
- the JsonWebKey object itself.
-
e
Get the e property: RSA public exponent, in Base64.- Returns:
- the e value.
-
withE
Set the e property: RSA public exponent, in Base64.- Parameters:
e
- the e value to set.- Returns:
- the JsonWebKey object itself.
-
k
Get the k property: Symmetric key.- Returns:
- the k value.
-
withK
Set the k property: Symmetric key.- Parameters:
k
- the k value to set.- Returns:
- the JsonWebKey object itself.
-
kid
Get the kid property: The "kid" (key ID) parameter is used to match a specific key. This is used, for instance, to choose among a set of keys within a JWK Set during key rollover. The structure of the "kid" value is unspecified. When "kid" values are used within a JWK Set, different keys within the JWK Set SHOULD use distinct "kid" values. (One example in which different keys might use the same "kid" value is if they have different "kty" (key type) values but are considered to be equivalent alternatives by the application using them.) The "kid" value is a case-sensitive string.- Returns:
- the kid value.
-
withKid
Set the kid property: The "kid" (key ID) parameter is used to match a specific key. This is used, for instance, to choose among a set of keys within a JWK Set during key rollover. The structure of the "kid" value is unspecified. When "kid" values are used within a JWK Set, different keys within the JWK Set SHOULD use distinct "kid" values. (One example in which different keys might use the same "kid" value is if they have different "kty" (key type) values but are considered to be equivalent alternatives by the application using them.) The "kid" value is a case-sensitive string.- Parameters:
kid
- the kid value to set.- Returns:
- the JsonWebKey object itself.
-
kty
Get the kty property: The "kty" (key type) parameter identifies the cryptographic algorithm family used with the key, such as "RSA" or "EC". "kty" values should either be registered in the IANA "JSON Web Key Types" registry established by [JWA] or be a value that contains a Collision- Resistant Name. The "kty" value is a case-sensitive string.- Returns:
- the kty value.
-
withKty
Set the kty property: The "kty" (key type) parameter identifies the cryptographic algorithm family used with the key, such as "RSA" or "EC". "kty" values should either be registered in the IANA "JSON Web Key Types" registry established by [JWA] or be a value that contains a Collision- Resistant Name. The "kty" value is a case-sensitive string.- Parameters:
kty
- the kty value to set.- Returns:
- the JsonWebKey object itself.
-
n
Get the n property: RSA modulus, in Base64.- Returns:
- the n value.
-
withN
Set the n property: RSA modulus, in Base64.- Parameters:
n
- the n value to set.- Returns:
- the JsonWebKey object itself.
-
p
Get the p property: RSA secret prime.- Returns:
- the p value.
-
withP
Set the p property: RSA secret prime.- Parameters:
p
- the p value to set.- Returns:
- the JsonWebKey object itself.
-
q
Get the q property: RSA secret prime, with p < q.- Returns:
- the q value.
-
withQ
Set the q property: RSA secret prime, with p < q.- Parameters:
q
- the q value to set.- Returns:
- the JsonWebKey object itself.
-
qi
Get the qi property: RSA Private Key Parameter.- Returns:
- the qi value.
-
withQi
Set the qi property: RSA Private Key Parameter.- Parameters:
qi
- the qi value to set.- Returns:
- the JsonWebKey object itself.
-
use
Get the use property: Use ("public key use") identifies the intended use of the public key. The "use" parameter is employed to indicate whether a public key is used for encrypting data or verifying the signature on data. Values are commonly "sig" (signature) or "enc" (encryption).- Returns:
- the use value.
-
withUse
Set the use property: Use ("public key use") identifies the intended use of the public key. The "use" parameter is employed to indicate whether a public key is used for encrypting data or verifying the signature on data. Values are commonly "sig" (signature) or "enc" (encryption).- Parameters:
use
- the use value to set.- Returns:
- the JsonWebKey object itself.
-
x
Get the x property: X coordinate for the Elliptic Curve point.- Returns:
- the x value.
-
withX
Set the x property: X coordinate for the Elliptic Curve point.- Parameters:
x
- the x value to set.- Returns:
- the JsonWebKey object itself.
-
x5C
Get the x5C property: The "x5c" (X.509 certificate chain) parameter contains a chain of one or more PKIX certificates [RFC5280]. The certificate chain is represented as a JSON array of certificate value strings. Each string in the array is a base64-encoded (Section 4 of [RFC4648] -- not base64url-encoded) DER [ITU.X690.1994] PKIX certificate value. The PKIX certificate containing the key value MUST be the first certificate.- Returns:
- the x5C value.
-
withX5C
Set the x5C property: The "x5c" (X.509 certificate chain) parameter contains a chain of one or more PKIX certificates [RFC5280]. The certificate chain is represented as a JSON array of certificate value strings. Each string in the array is a base64-encoded (Section 4 of [RFC4648] -- not base64url-encoded) DER [ITU.X690.1994] PKIX certificate value. The PKIX certificate containing the key value MUST be the first certificate.- Parameters:
x5C
- the x5C value to set.- Returns:
- the JsonWebKey object itself.
-
y
Get the y property: Y coordinate for the Elliptic Curve point.- Returns:
- the y value.
-
withY
Set the y property: Y coordinate for the Elliptic Curve point.- Parameters:
y
- the y value to set.- Returns:
- the JsonWebKey object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-