CryptosignAuthentication.fromPkcs8PrivateKey constructor

CryptosignAuthentication.fromPkcs8PrivateKey(
  1. String pkcs8FileContent
)

This method takes a pkcs8FileContent and reads its private key to make the authentication process possible with crypto sign. The pkcs8FileContent must have a ed25519 key file. If the file was password protected, you may convert it into a unprotected file first. Password protection is not supported yet.

Implementation

factory CryptosignAuthentication.fromPkcs8PrivateKey(
    String pkcs8FileContent) {
  return CryptosignAuthentication(
      SigningKey.fromSeed(
          Pkcs8.loadPrivateKeyFromPKCS8Ed25519(pkcs8FileContent)),
      null);
}