encodeOpenSsh method

String encodeOpenSsh()

Encode an other public key in the OpenSSH Public Key format.

Note: the OpenSSH format only supports one comment. Any additional comments and all other properties are not included in the encoding.

Programs normally use encode method from the PublicKeyExt extension, with the appropriate format, which will invoke this method.

Implementation

String encodeOpenSsh() {
  _checkDataStartsWithKeyType(data);

  final encoding = OpenSshPublicKey(data, properties.comment);
  return encoding.encode();
}