Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit ed66512

Browse files
committedNov 30, 2019
Cleanup
1 parent 9be416b commit ed66512

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed
 

‎KotlinNimbusJoseJwt/src/main/kotlin/ES256K.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import java.time.Instant
1212
import java.util.*
1313

1414
fun main() {
15-
// create EC Key
15+
// create EC key
1616
val key: ECKey = ECKeyGenerator(Curve.P_256K)
1717
.keyID("123")
1818
.generate()

‎KotlinNimbusJoseJwt/src/main/kotlin/EdDSA.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@ import java.time.Instant
1212
import java.util.*
1313

1414
fun main() {
15+
// create key
1516
val key: OctetKeyPair = OctetKeyPairGenerator(Curve.Ed25519)
1617
.keyID("123")
1718
.generate()
1819

20+
// create signed JWT
1921
val header = JWSHeader.Builder(JWSAlgorithm.EdDSA)
2022
.type(JOSEObjectType.JWT)
2123
.keyID(key.keyID)
@@ -33,7 +35,6 @@ fun main() {
3335
val jwt: String = signedJWT.serialize()
3436
println(jwt)
3537

36-
3738
// validate signature (and only signature)
3839
val isValid: Boolean = SignedJWT
3940
.parse(jwt)

0 commit comments

Comments
 (0)
Please sign in to comment.