CryptosignAuthentication.fromPuttyPrivateKey constructor

CryptosignAuthentication.fromPuttyPrivateKey(
  1. String ppkFileContent, {
  2. String? password,
})

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

Implementation

factory CryptosignAuthentication.fromPuttyPrivateKey(String ppkFileContent,
    {String? password}) {
  return CryptosignAuthentication(
      SigningKey.fromSeed(
          loadPrivateKeyFromPpk(ppkFileContent, password: password)),
      null);
}