GenericPublicKey class
Generic public key.
This is used to represent a public key where the details of the algorithm are not known. All that is know about the public key is its keyType and the binary data for it.
This class is used to represent public keys that have been parsed from the OpenSSH Public Key format (i.e. the one line format) and this library has not implemented support for that particular key-type.
Currently, this library has only impemented RSA keys, so this class will be used for representing all other public keys in the OpenSSH Public Key format. For example:
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5...
ssh-dss AAAAB3NzaC1kc3MAAACBAMhr
ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlz...
This class uses the PublicKeyMixin mixin for additional members relating to encoding it in a file format. Namely, a collection of properties and (if it was created by decoding text) source.
The only encoding format that is supported is the OpenSSH Public Key format, using encodeOpenSsh.
Methods for encoding it in different file formats are available. But
normally programs can just invoke the encode
method (defined by the
PublicKeyExt extension on the Pointy Castle PublicKey
), with a format
parameter -- that will cause one of these formatting methods to be invoked.
- Mixed in types
- Available Extensions
Constructors
- GenericPublicKey(Uint8List data)
- Constructor.
Properties
- data ↔ Uint8List
-
The data making up the public key.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- keyType → String
-
no setter
- properties → Properties
-
Properties associated with the public key.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- source → PubTextSource?
-
Section of text the public key was decoded from and the format decoded.
no setterinherited
Methods
-
encodeOpenSsh(
) → String - Encode an other public key in the OpenSSH Public Key format.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited