0

I am trying to utilize the jpaseto library and when I run the following code, I get this error: dev.paseto.jpaseto.PasetoKeyException: Failed to generate Ed25519 key pair The exception is thrown on the second line.

KeyPair keyPair = Keys.keyPairFor(Version.V2);
String token = Pasetos.V2.PUBLIC.builder()
                .setSubject("Joe")
                .setPrivateKey(keyPair.getPrivate())
                .compact();

I am working in Android Studio and having the following in my build.gradle file:

implementation 'dev.paseto:jpaseto-api:0.6.0'
    runtimeOnly 'dev.paseto:jpaseto-impl:0.6.0',
            'dev.paseto:jpaseto-jackson:0.6.0',

            // Uncomment the next lines if you want to use Bouncy Castle, supports all Paseto formats
            'dev.paseto:jpaseto-bouncy-castle:0.6.0'

Can someone tell me what I'm doing wrong?

Lorne
  • 79
  • 1
  • 9

0 Answers0