java.lang.Object
com.webauthn4j.data.attestation.authenticator.AbstractCOSEKey
com.webauthn4j.data.attestation.authenticator.EdDSACOSEKey
- All Implemented Interfaces:
COSEKey
-
Constructor Summary
ConstructorsConstructorDescriptionEdDSACOSEKey(@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[] d) Constructor for key pair -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull EdDSACOSEKeycreate(@NotNull EdECPrivateKey privateKey) CreateEdDSACOSEKeyfromEdECPrivateKey.static @NotNull EdDSACOSEKeycreate(@NotNull EdECPrivateKey privateKey, @Nullable COSEAlgorithmIdentifier alg) CreateEdDSACOSEKeyfromEdECPrivateKey.static @NotNull EdDSACOSEKeycreate(@NotNull EdECPublicKey publicKey) CreateEdDSACOSEKeyfromEdECPublicKey.static @NotNull EdDSACOSEKeycreate(@NotNull EdECPublicKey publicKey, @Nullable COSEAlgorithmIdentifier alg) CreateEdDSACOSEKeyfromEdECPublicKey.static @NotNull EdDSACOSEKeyCreateEdDSACOSEKeyfromKeyPair.static @NotNull EdDSACOSEKeycreate(@NotNull KeyPair keyPair, @Nullable COSEAlgorithmIdentifier alg) CreateEdDSACOSEKeyfromKeyPair.boolean@Nullable CurvegetCurve()@org.jetbrains.annotations.Nullable byte[]getD()@NotNull COSEKeyType@Nullable PrivateKey@Nullable PublicKey@org.jetbrains.annotations.Nullable byte[]getX()inthashCode()booleanbooleantoString()voidvalidate()Methods inherited from class com.webauthn4j.data.attestation.authenticator.AbstractCOSEKey
getAlgorithm, getBaseIV, getKeyId, getKeyOps
-
Constructor Details
-
EdDSACOSEKey
public EdDSACOSEKey(@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[] d) Constructor for key pair- Parameters:
keyId- keyIdalgorithm- algorithmkeyOps- keyOpscurve- curvex- xd- d
-
-
Method Details
-
create
@NotNull public static @NotNull EdDSACOSEKey create(@NotNull @NotNull EdECPrivateKey privateKey, @Nullable @Nullable COSEAlgorithmIdentifier alg) CreateEdDSACOSEKeyfromEdECPrivateKey.- Parameters:
privateKey- private keyalg- COSE algorithm identifier- Returns:
EdDSACOSEKey
-
create
@NotNull public static @NotNull EdDSACOSEKey create(@NotNull @NotNull EdECPublicKey publicKey, @Nullable @Nullable COSEAlgorithmIdentifier alg) CreateEdDSACOSEKeyfromEdECPublicKey.- Parameters:
publicKey- public keyalg- COSE algorithm identifier- Returns:
EdDSACOSEKey
-
create
@NotNull public static @NotNull EdDSACOSEKey create(@NotNull @NotNull KeyPair keyPair, @Nullable @Nullable COSEAlgorithmIdentifier alg) CreateEdDSACOSEKeyfromKeyPair.- Parameters:
keyPair- key pair- Returns:
EdDSACOSEKey
-
create
CreateEdDSACOSEKeyfromEdECPrivateKey.- Parameters:
privateKey- private key- Returns:
EdDSACOSEKey
-
create
CreateEdDSACOSEKeyfromEdECPublicKey.- Parameters:
publicKey- public key- Returns:
EdDSACOSEKey
-
create
CreateEdDSACOSEKeyfromKeyPair.- Parameters:
keyPair- key pair- Returns:
EdDSACOSEKey
-
hasPublicKey
public boolean hasPublicKey() -
hasPrivateKey
public boolean hasPrivateKey() -
getPublicKey
-
getPrivateKey
-
getKeyType
- Specified by:
getKeyTypein interfaceCOSEKey- Specified by:
getKeyTypein classAbstractCOSEKey
-
getCurve
-
getX
@Nullable public @org.jetbrains.annotations.Nullable byte[] getX() -
getD
@Nullable public @org.jetbrains.annotations.Nullable byte[] getD() -
validate
public void validate() -
equals
- Overrides:
equalsin classAbstractCOSEKey
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractCOSEKey
-
toString
-