Skip to content

Commit 2581312

Browse files
committed
fix: P-256K is now called secp256k1.
Signed-off-by: Markus Sabadello <[email protected]>
1 parent 1342900 commit 2581312

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/main/java/com/danubetech/verifiablecredentials/jwt/JwtObject.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,17 +91,17 @@ public String sign_Ed25519_EdDSA(com.nimbusds.jose.jwk.OctetKeyPair privateKey)
9191
return this.sign(new com.nimbusds.jose.crypto.Ed25519Signer(privateKey), JWSAlgorithm.EdDSA);
9292
}
9393

94-
public String sign_P256K_ES256K(ByteSigner signer) throws JOSEException {
94+
public String sign_secp256k1_ES256K(ByteSigner signer) throws JOSEException {
9595

9696
return this.sign(new JWSSignerAdapter(signer, JWSAlgorithm.ES256K), JWSAlgorithm.ES256K);
9797
}
9898

99-
public String sign_P256K_ES256K(ECKey privateKey) throws JOSEException {
99+
public String sign_secp256k1_ES256K(ECKey privateKey) throws JOSEException {
100100

101-
return this.sign_P256K_ES256K(new secp256k1_ES256K_PrivateKeySigner(privateKey));
101+
return this.sign_secp256k1_ES256K(new secp256k1_ES256K_PrivateKeySigner(privateKey));
102102
}
103103

104-
public String sign_P256K_ES256K(com.nimbusds.jose.jwk.ECKey privateKey) throws JOSEException {
104+
public String sign_secp256k1_ES256K(com.nimbusds.jose.jwk.ECKey privateKey) throws JOSEException {
105105

106106
return this.sign(new com.nimbusds.jose.crypto.ECDSASigner(privateKey), JWSAlgorithm.ES256K);
107107
}
@@ -145,17 +145,17 @@ public boolean verify_Ed25519_EdDSA(com.nimbusds.jose.jwk.OctetKeyPair publicKey
145145
return this.verify(new com.nimbusds.jose.crypto.Ed25519Verifier(publicKey));
146146
}
147147

148-
public boolean verify_P256K_ES256K(ByteVerifier verifier) throws JOSEException {
148+
public boolean verify_secp256k1_ES256K(ByteVerifier verifier) throws JOSEException {
149149

150150
return this.verify(new JWSVerifierAdapter(verifier, JWSAlgorithm.ES256K));
151151
}
152152

153-
public boolean verify_P256K_ES256K(ECKey publicKey) throws JOSEException {
153+
public boolean verify_secp256k1_ES256K(ECKey publicKey) throws JOSEException {
154154

155-
return this.verify_P256K_ES256K(new secp256k1_ES256K_PublicKeyVerifier(publicKey));
155+
return this.verify_secp256k1_ES256K(new secp256k1_ES256K_PublicKeyVerifier(publicKey));
156156
}
157157

158-
public boolean verify_P256K_ES256K(com.nimbusds.jose.jwk.ECKey publicKey) throws JOSEException {
158+
public boolean verify_secp256k1_ES256K(com.nimbusds.jose.jwk.ECKey publicKey) throws JOSEException {
159159

160160
return this.verify(new com.nimbusds.jose.crypto.ECDSAVerifier(publicKey));
161161
}

0 commit comments

Comments
 (0)