OpenSshPrivateKey class Null safety
Represents the OpenSSH private key format.
This is proprietary format that is not documented.
Unofficial documentation on this format can be found in A. J. O'Neal's blog post on The OpenSSH Private Key Format.
- Implemented types
Constructors
- OpenSshPrivateKey(String cipherName, String kdfName, Uint8List kdf, Uint8List publicKeyBytes, Uint8List privateKeyBytes, [PvtTextSource? source])
- Default constructor
- OpenSshPrivateKey.decode(Uint8List bytes, {PvtTextSource? source})
-
Decode from a sequence of bytes.
factory
Properties
- cipherName ↔ String
-
Name of encryption cipher
read / write
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- kdf ↔ Uint8List
-
Key definition function parameters
read / write
- kdfName ↔ String
-
Name of the key definition function
read / write
- privateKeyBytes ↔ Uint8List
-
Bytes containing the private key
read / write
- privateKeyType → String
-
The key-type (extracted from the bytes of the private key)
read-only
- publicKeyBytes ↔ Uint8List
-
Bytes containing the public key
read / write
- publicKeyType → String
-
The key-type (extracted from the bytes of the public key)
read-only
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
- source → PvtTextSource?
-
Text source from where the private key was decoded from [...]
final
Methods
-
encode(
) → Uint8List -
Encode into bytes.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
toString(
) → String -
A string representation of this object. [...]
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator. [...]
inherited
Constants
- magicVersionId → const String
-
Expected magic value
'openssh-key-v1'