CryptosignAuthentication class

Inheritance

Constructors

CryptosignAuthentication(SigningKey privateKey, String? channelBinding)
This is the default constructor that will take an already gathered privateKey integer list to initialize the cryptosign authentication method.
CryptosignAuthentication.fromBase64(String base64PrivateKey)
This method takes a given base64PrivateKey to make crypto sign possible. This key needs to generated to be used with the ed25519 algorithm
factory
CryptosignAuthentication.fromHex(String? hexPrivateKey)
This method takes a given hexPrivateKey to make crypto sign possible. This key needs to generated to be used with the ed25519 algorithm
factory
CryptosignAuthentication.fromOpenSshPrivateKey(String openSshFileContent, {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.
factory
CryptosignAuthentication.fromPuttyPrivateKey(String ppkFileContent, {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.
factory

Properties

channelBinding String?
final
hashCode int
The hash code for this object.
no setterinherited
privateKey → SigningKey
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

challenge(Extra extra) Future<Authenticate>
This method is called by the session if the router returns the challenge or the challenges extra respectively. This method uses the passed hex encoded challenge and signs it with the given private key
override
getName() String
This method is called by the session to identify the authentication name.
override
hello(String? realm, Details details) Future<void>
This method is called by the session to modify the hello details for a given realm. Cryptosign will add a 'pubkey' and a 'channel_binding' to the authextra
override
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

Static Properties

channelBindingTlsUnique String
final
openSshFooter String
final
openSshHeader String
final

Static Methods

decodePpkPrivateKey(List<int> encryptedPrivateKey, String password) Uint8List
This method takes a encryptedPrivateKey and decrypts it by useing the provided password.
hexToBin(String? hexString) Uint8List
This method converts a given hexString to its byte representation.
loadPrivateKeyFromOpenPCKS1Pem(String pemFileContent) → void
loadPrivateKeyFromOpenPCKS8Pem(String pemFileContent) → void
loadPrivateKeyFromOpenSSHPem(String pemFileContent, {String? password}) Uint8List
Loads a private key from a pemFileContent that has been encoded with the open ssh file format:
loadPrivateKeyFromPpk(String? ppkFileContent, {String? password}) Uint8List
This helper method takes a ppkFileContent and its password and extracts the private key into a list.
ppkMacCheck(String? privateMac, PpkMacData macData, String? password) → void
This method performs the mac check against the privateMac to validate the files content. It is also capable of testing whether the password was wrong or not. The macData is data used to compute the mac and to compare it to the given privateMac