-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
java.lang.NoClassDefFoundError: Could not initialize class com.danubetech.keyformats.crypto.provider.impl.NaClSodiumEd25519Provider #13 #11
Comments
Hello, thanks for raising the issue, and sorry to hear about the problems you have here. Please install libsodium on your machine, or alternatively try to use TinkEd25519Provider instead of NaClSodiumEd25519Provider. See this other issue for more information on how to do that: #8 Please let me know if this helps or you still have problems. |
Sorry for troubling you, can you please tell me how to use TinkEd25519Provider , I cannot understand the steps |
Hello, in your project you should include a file with the following path and name: This file should contain the following content:
|
Yes, but its a jar file i couldn't modify it |
But you can create this file inside your own project, which will "override" the one in the .jar file. |
Hi , I am getting this exception while generating the sign could you pls guide me on this.
for the below sample, i am getting this exception (Bold line)
Map<String, Object> claims = new LinkedHashMap<>();
Map<String, Object> degree = new LinkedHashMap<>();
degree.put("name", "Bachelor of Science and Arts");
degree.put("type", "BachelorDegree");
claims.put("college", "Test University");
claims.put("degree", degree);
CredentialSubject credentialSubject = CredentialSubject.builder()
.id(URI.create("did:example:ebfeb1f712ebc6f1c276e12ec21"))
.claims(claims)
.build();
VerifiableCredential verifiableCredential = VerifiableCredential.builder()
.context(VerifiableCredentialContexts.JSONLD_CONTEXT_W3C_2018_CREDENTIALS_EXAMPLES_V1)
.type("UniversityDegreeCredential")
.id(URI.create("http://example.edu/credentials/3732"))
.issuer(URI.create("did:example:76e12ec712ebc6f1c221ebfeb1f"))
.issuanceDate(JsonLDUtils.stringToDate("2019-06-16T18:56:59Z"))
.expirationDate(JsonLDUtils.stringToDate("2019-06-17T18:56:59Z"))
.credentialSubject(credentialSubject)
.build();
byte[] testEd25519PrivateKey = Hex.decodeHex("984b589e121040156838303f107e13150be4a80fc5088ccba0b0bdc9b1d89090de8777a28f8da1a74e7a13090ed974d879bf692d001cddee16e4cc9f84b60580".toCharArray());
Ed25519Signature2018LdSigner signer = new Ed25519Signature2018LdSigner(testEd25519PrivateKey);
signer.setCreated(new Date());
signer.setProofPurpose(LDSecurityKeywords.JSONLD_TERM_ASSERTIONMETHOD);
signer.setVerificationMethod(URI.create("did:example:76e12ec712ebc6f1c221ebfeb1f#keys-1"));
LdProof ldProof = signer.sign(verifiableCredential);
System.out.println(verifiableCredential.toJson(true));
The text was updated successfully, but these errors were encountered: