utils library

Constants

sshnpDeviceNameRegex → const String

Functions

assertValidValue(Map m, String k, Type t) → void
Assert that the value for key k in Map m is non-null and is of Type t. Throws an ArgumentError if the value is null, or is not of Type t.
atSignIsActivated(AtClient atClient, String atSign) Future<bool>
Checks if the provided atSign's atServer has been properly activated with a public RSA key. atClient must be authenticated atSign is the atSign to check Returns true, if the atSign's cloud secondary server has an existing public:publickey@ in their server, Returns false, if the atSign's cloud secondary exists, but does not have an existing public:publickey@ Throws AtClientException if the cloud secondary is invalid or not reachable
checkNonAscii(String test) bool
getDefaultAtKeysFilePath(String homeDirectory, String? atSign) String
getHomeDirectory({bool throwIfNull = false}) String?
Get the home directory or null if unknown.
getLocallyCachedPK(AtClient atClient, String atSign, {FileSystem? fs}) Future<String>
If the PK for atSign is in the sshnp local cache, then return it. If it is not, then fetch it via the atClient, and store it.
getUserName({bool throwIfNull = false}) String?
Get the local username or null if unknown
signAndWrapAndJsonEncode(AtClient atClient, Map payload) String
verifyEnvelopeSignature(AtClient atClient, String requestingAtsign, AtSignLogger logger, Map envelope, {FileSystem? fs}) Future<void>

Typedefs

SrvGenerator<T> = Srv<T> Function(String, int, {bool? bindLocalPort, int? localPort, String? rvdAuthString, String? sessionAESKeyString, String? sessionIVString})