CryptosignAuthentication.fromOpenSshPrivateKey constructor

CryptosignAuthentication.fromOpenSshPrivateKey(
  1. String openSshFileContent, {
  2. String? password,
})

This method takes a openSshFileContent and reads its private key to make the authentication process possible with crypto sign. The openSshFileContent must have a ed25519 key file. If the file was password protected, the optional password will decrypt the private key.

Implementation

factory CryptosignAuthentication.fromOpenSshPrivateKey(
    String openSshFileContent,
    {String? password}) {
  return CryptosignAuthentication(
      SigningKey.fromSeed(loadPrivateKeyFromOpenSSHPem(openSshFileContent,
          password: password)),
      null);
}