java.lang.Object
com.webauthn4j.data.attestation.authenticator.AbstractCOSEKey
com.webauthn4j.data.attestation.authenticator.EC2COSEKey
- All Implemented Interfaces:
COSEKey
-
Constructor Summary
ConstructorsConstructorDescriptionEC2COSEKey(@org.jetbrains.annotations.Nullable byte[] keyId, @Nullable COSEAlgorithmIdentifier algorithm, @Nullable List<COSEKeyOperation> keyOps, @Nullable Curve curve, @org.jetbrains.annotations.Nullable byte[] d) Constructor for public keyEC2COSEKey(@org.jetbrains.annotations.Nullable byte[] keyId, @Nullable COSEAlgorithmIdentifier algorithm, @Nullable List<COSEKeyOperation> keyOps, @Nullable Curve curve, @org.jetbrains.annotations.Nullable byte[] x, @org.jetbrains.annotations.Nullable byte[] y) Constructor for public keyEC2COSEKey(@org.jetbrains.annotations.Nullable byte[] keyId, @Nullable COSEAlgorithmIdentifier algorithm, @Nullable List<COSEKeyOperation> keyOps, @Nullable Curve curve, @org.jetbrains.annotations.Nullable byte[] x, @org.jetbrains.annotations.Nullable byte[] y, @org.jetbrains.annotations.Nullable byte[] d) Constructor for key pair -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull EC2COSEKeycreate(@NotNull ECPrivateKey privateKey) CreateEC2COSEKeyfromECPrivateKey.static @NotNull EC2COSEKeycreate(@NotNull ECPrivateKey privateKey, @Nullable COSEAlgorithmIdentifier alg) static @NotNull EC2COSEKeycreate(@NotNull ECPublicKey publicKey) CreateEC2COSEKeyfromECPublicKey.static @NotNull EC2COSEKeycreate(@NotNull ECPublicKey publicKey, @Nullable COSEAlgorithmIdentifier alg) static @NotNull EC2COSEKeyCreateEC2COSEKeyfromKeyPair.static @NotNull EC2COSEKeycreate(@NotNull KeyPair keyPair, @Nullable COSEAlgorithmIdentifier alg) static @NotNull EC2COSEKeycreateFromUncompressedECCKey(@org.jetbrains.annotations.NotNull byte[] publicKey) create from uncompressed ECC 256-bit keyboolean@Nullable CurvegetCurve()@org.jetbrains.annotations.Nullable byte[]getD()@NotNull COSEKeyType@Nullable PrivateKey@Nullable PublicKey@org.jetbrains.annotations.Nullable byte[]getX()@org.jetbrains.annotations.Nullable byte[]getY()inthashCode()booleanbooleantoString()voidvalidate()Methods inherited from class com.webauthn4j.data.attestation.authenticator.AbstractCOSEKey
getAlgorithm, getBaseIV, getKeyId, getKeyOps
-
Constructor Details
-
EC2COSEKey
public EC2COSEKey(@Nullable @org.jetbrains.annotations.Nullable byte[] keyId, @Nullable @Nullable COSEAlgorithmIdentifier algorithm, @Nullable @Nullable List<COSEKeyOperation> keyOps, @Nullable @Nullable Curve curve, @Nullable @org.jetbrains.annotations.Nullable byte[] x, @Nullable @org.jetbrains.annotations.Nullable byte[] y, @Nullable @org.jetbrains.annotations.Nullable byte[] d) Constructor for key pair- Parameters:
keyId- keyIdalgorithm- algorithmkeyOps- keyOpscurve- curvex- xy- yd- d
-
EC2COSEKey
public EC2COSEKey(@Nullable @org.jetbrains.annotations.Nullable byte[] keyId, @Nullable @Nullable COSEAlgorithmIdentifier algorithm, @Nullable @Nullable List<COSEKeyOperation> keyOps, @Nullable @Nullable Curve curve, @Nullable @org.jetbrains.annotations.Nullable byte[] x, @Nullable @org.jetbrains.annotations.Nullable byte[] y) Constructor for public key- Parameters:
keyId- keyIdalgorithm- algorithmkeyOps- keyOpscurve- curvex- xy- y
-
EC2COSEKey
public EC2COSEKey(@Nullable @org.jetbrains.annotations.Nullable byte[] keyId, @Nullable @Nullable COSEAlgorithmIdentifier algorithm, @Nullable @Nullable List<COSEKeyOperation> keyOps, @Nullable @Nullable Curve curve, @Nullable @org.jetbrains.annotations.Nullable byte[] d) Constructor for public key- Parameters:
keyId- keyIdalgorithm- algorithmkeyOps- keyOpscurve- curved- d
-
-
Method Details
-
create
@NotNull public static @NotNull EC2COSEKey create(@NotNull @NotNull ECPrivateKey privateKey, @Nullable @Nullable COSEAlgorithmIdentifier alg) -
create
@NotNull public static @NotNull EC2COSEKey create(@NotNull @NotNull ECPublicKey publicKey, @Nullable @Nullable COSEAlgorithmIdentifier alg) -
create
@NotNull public static @NotNull EC2COSEKey create(@NotNull @NotNull KeyPair keyPair, @Nullable @Nullable COSEAlgorithmIdentifier alg) -
create
CreateEC2COSEKeyfromECPrivateKey.- Parameters:
privateKey- private key- Returns:
EC2COSEKey
-
create
CreateEC2COSEKeyfromECPublicKey.- Parameters:
publicKey- public key- Returns:
EC2COSEKey
-
create
CreateEC2COSEKeyfromKeyPair.- Parameters:
keyPair- key pair- Returns:
EC2COSEKey
-
createFromUncompressedECCKey
@NotNull public static @NotNull EC2COSEKey createFromUncompressedECCKey(@NotNull @org.jetbrains.annotations.NotNull byte[] publicKey) create from uncompressed ECC 256-bit key- Parameters:
publicKey- public key- Returns:
EC2COSEKey
-
getKeyType
- Specified by:
getKeyTypein interfaceCOSEKey- Specified by:
getKeyTypein classAbstractCOSEKey
-
getCurve
-
getX
@Nullable public @org.jetbrains.annotations.Nullable byte[] getX() -
getY
@Nullable public @org.jetbrains.annotations.Nullable byte[] getY() -
getD
@Nullable public @org.jetbrains.annotations.Nullable byte[] getD() -
getPublicKey
-
getPrivateKey
-
hasPublicKey
public boolean hasPublicKey() -
hasPrivateKey
public boolean hasPrivateKey() -
validate
public void validate() -
equals
- Overrides:
equalsin classAbstractCOSEKey
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractCOSEKey
-
toString
-