### Install basic_utils dependency Source: https://pub.dev/documentation/basic_utils/latest/index.html Add the package to your pubspec.yaml file. ```yaml dependencies: basic_utils: ^5.8.2 ``` -------------------------------- ### int get macSize Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/Mac/macSize.html Retrieves the output size of the MAC. ```APIDOC ## int get macSize ### Description Returns the output size of the MAC as an integer. ### Signature `int get macSize` ``` -------------------------------- ### Define BEGIN_PUBLIC_KEY constant Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/CryptoUtils/BEGIN_PUBLIC_KEY-constant.html Defines the static constant string used to denote the start of a public key block. ```dart static const BEGIN_PUBLIC_KEY = '-----BEGIN PUBLIC KEY-----'; ``` -------------------------------- ### KeyParameter.offset(Uint8List key, int keyOff, int keyLen) Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/KeyParameter/KeyParameter.offset.html Initializes a new KeyParameter instance by copying a slice of the provided key array starting at a specific offset. ```APIDOC ## KeyParameter.offset Constructor ### Description Creates a new KeyParameter instance. It allocates a new Uint8List of length `keyLen` and copies the data from the source `key` array starting at `keyOff`. ### Signature `KeyParameter.offset(Uint8List key, int keyOff, int keyLen)` ### Parameters - **key** (Uint8List) - The source byte array containing the key data. - **keyOff** (int) - The starting index in the source array to begin copying. - **keyLen** (int) - The number of bytes to copy from the source array. ``` -------------------------------- ### init(ECPrivateKey param) Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/ECDHAgreement-class.html Initializes the agreement engine with the provided private key. ```APIDOC ### Method `void init(ECPrivateKey param)` ### Description Initializes the agreement engine using the specified private key. ### Parameters - **param** (ECPrivateKey) - Required - The private key used to initialize the agreement engine. ``` -------------------------------- ### void init(Uint8List password, Uint8List salt, int iterationCount) Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/PBEParametersGenerator/init.html Initializes the PBE parameters with the provided password, salt, and iteration count. ```APIDOC ## void init(Uint8List password, Uint8List salt, int iterationCount) ### Description Initializes the PBE parameters required for encryption operations. ### Parameters - **password** (Uint8List) - Required - The password used for key derivation. - **salt** (Uint8List) - Required - The salt value for the PBE process. - **iterationCount** (int) - Required - The number of iterations to perform. ``` -------------------------------- ### init(CipherParameters params) Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/Mac-class.html Initializes the MAC with the provided parameters. ```APIDOC ## init(CipherParameters params) ### Description Initializes the MAC with its initialization `params`. The type of CipherParameters depends on the algorithm being used. ### Parameters - **params** (CipherParameters) - Required - The initialization parameters for the MAC. ``` -------------------------------- ### int get byteLength Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/ECFieldElement/byteLength.html Retrieves the byte length of the ECFieldElement. ```APIDOC ## Property: byteLength ### Description Returns the length of the field element in bytes. ### Signature `int get byteLength` ### Returns - **int** - The size of the field element in bytes. ``` -------------------------------- ### String get fieldName Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/ECFieldElement/fieldName.html Retrieves the name of the field as a String. ```APIDOC ## Property: fieldName ### Description Returns the name of the field associated with the ECFieldElement. ### Signature `String get fieldName` ``` -------------------------------- ### init(bool forSigning, CipherParameters params) Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/Signer-class.html Initializes the signer with the required parameters for either signing or verification. ```APIDOC ## init(bool forSigning, CipherParameters params) ### Description Initializes the signer. The type of CipherParameters depends on the specific algorithm implementation. ### Parameters - **forSigning** (bool) - Required - True if the signer is being initialized for signing, false for verification. - **params** (CipherParameters) - Required - The initialization parameters specific to the algorithm. ``` -------------------------------- ### init(bool forEncryption, CipherParameters? params) Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/BlockCipher-class.html Initializes the cipher with specific parameters. ```APIDOC ## Method: init(bool forEncryption, CipherParameters? params) ### Description Initializes the cipher with the provided parameters. The required type of CipherParameters depends on the specific algorithm implementation. ### Parameters - **forEncryption** (bool) - Required - True if the cipher is being initialized for encryption, false for decryption. - **params** (CipherParameters?) - Optional - The initialization parameters required by the specific algorithm. ``` -------------------------------- ### int get blockSize Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/BlockCipher/blockSize.html Retrieves the block size of the cipher. ```APIDOC ## Property: blockSize ### Description Returns the block size of the current cipher instance. ### Signature `int get blockSize` ``` -------------------------------- ### int get fieldSize Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/ECFieldElement/fieldSize.html Retrieves the size of the field as an integer value. ```APIDOC ## fieldSize ### Description Returns the size of the field as an integer. ### Signature `int get fieldSize` ``` -------------------------------- ### init(Uint8List password, Uint8List salt, int iterationCount) Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/PBEParametersGenerator-class.html Initializes the generator with password, salt, and iteration count. ```APIDOC ## init(Uint8List password, Uint8List salt, int iterationCount) ### Description Initializes the generator with the provided password, salt, and iteration count. ### Parameters - **password** (Uint8List) - The password to use for derivation. - **salt** (Uint8List) - The salt value. - **iterationCount** (int) - The number of iterations for the derivation process. ``` -------------------------------- ### void init(CipherParameters params) Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/ECEncryptor/init.html Initializes the encryptor instance with the provided cipher parameters. ```APIDOC ## void init(CipherParameters params) ### Description Initializes the encryptor. This method must be called to configure the encryptor with the necessary parameters before performing encryption operations. ### Parameters - **params** (CipherParameters) - Required - The cipher parameters required for initialization. ``` -------------------------------- ### Get domainName property Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/ECDomainParameters/domainName.html Retrieves the standard name associated with the domain. ```dart String get domainName; ``` -------------------------------- ### void init(bool forEncryption, CipherParameters params) Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/AEADCipher/init.html Initializes the cipher for either encryption or decryption using the provided parameters. ```APIDOC ## void init(bool forEncryption, CipherParameters params) ### Description Initializes the AEADCipher instance. This method must be called to configure the cipher before performing encryption or decryption operations. ### Parameters - **forEncryption** (bool) - Required - Set to true if the cipher is being initialized for encryption, false for decryption. - **params** (CipherParameters) - Required - The specific parameters required for the cipher initialization. ``` -------------------------------- ### int get digestSize Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/Digest/digestSize.html Retrieves the output size of the digest in bytes. ```APIDOC ## Property: digestSize ### Description Returns the output size of the digest in bytes. ### Signature `int get digestSize` ``` -------------------------------- ### Get algorithmName property Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/Algorithm/algorithmName.html Retrieves the standard name of the algorithm as a string. ```dart String get algorithmName; ``` -------------------------------- ### void init(bool forEncryption, CipherParameters? params) Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/BlockCipher/init.html Initializes the cipher with the provided parameters and specifies whether the operation is for encryption or decryption. ```APIDOC ## void init(bool forEncryption, CipherParameters? params) ### Description Initializes the cipher with its initialization parameters. The type of CipherParameters depends on the algorithm being used. ### Parameters - **forEncryption** (bool) - Required - Specifies if the cipher should perform encryption (true) or decryption (false). - **params** (CipherParameters?) - Optional - The initialization parameters required by the specific cipher algorithm. ``` -------------------------------- ### Initialize ParametersWithSaltConfiguration Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/ParametersWithSaltConfiguration/ParametersWithSaltConfiguration.html Constructor implementation for setting up parameters with a specified salt length and random source. ```dart ParametersWithSaltConfiguration( this.parameters, this.random, this.saltLength); ``` -------------------------------- ### effectiveKeyBits Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/RC2Parameters-class.html Property to get or set the effective key bits for the RC2 cipher. ```APIDOC ## effectiveKeyBits ### Description Gets or sets the effective key bits used by the RC2 cipher instance. ### Type int ``` -------------------------------- ### void init(CipherParameters params) Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/ECDecryptor/init.html Initializes the decryptor instance with the provided cipher parameters. ```APIDOC ## void init(CipherParameters params) ### Description Initializes the decryptor. This method must be called to configure the decryptor with the necessary cipher parameters before performing decryption operations. ### Parameters - **params** (CipherParameters) - Required - The cipher parameters required for initialization. ``` -------------------------------- ### ECCurve get curve Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/ECPoint/curve.html Retrieves the ECCurve object associated with the current instance. ```APIDOC ## ECCurve get curve ### Description Retrieves the ECCurve configuration object associated with the ECPoint instance. ### Signature ECCurve get curve; ``` -------------------------------- ### init(CipherParameters params) Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/KeyDerivator-class.html Initializes the key derivator with the required parameters. ```APIDOC ### Method void init(CipherParameters params) ### Description Init the derivator with its initialization params. The type of CipherParameters depends on the algorithm being used. ### Parameters - **params** (CipherParameters) - The initialization parameters specific to the algorithm. ``` -------------------------------- ### int get outputBlockSize Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/AsymmetricBlockCipher/outputBlockSize.html Retrieves the maximum output block size for the cipher. ```APIDOC ## Property: outputBlockSize ### Description Get this cipher's maximum output block size. ### Signature `int get outputBlockSize` ### Returns - **int** - The maximum output block size. ``` -------------------------------- ### init(CipherParameters params) Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/KeyGenerator-class.html Initializes the key generator with specific parameters. ```APIDOC ## init(CipherParameters params) ### Description Initializes the generator with the provided configuration parameters. The required type of CipherParameters depends on the specific algorithm implementation. ### Parameters - **params** (CipherParameters) - Required - The initialization parameters for the generator. ``` -------------------------------- ### int get inputBlockSize Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/AsymmetricBlockCipher/inputBlockSize.html Retrieves the maximum input block size for the cipher. ```APIDOC ## int get inputBlockSize ### Description Returns the maximum input block size allowed for the current asymmetric block cipher instance. ### Signature `int get inputBlockSize` ### Returns - **int** - The maximum input block size. ``` -------------------------------- ### String get algorithmName Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/AEADCipher/algorithmName.html Retrieves the standard name of the AEAD cipher algorithm. ```APIDOC ## algorithmName ### Description Returns the standard name of the AEAD cipher algorithm. ### Signature `String get algorithmName` ### Returns - **String**: The standard name of the algorithm. ``` -------------------------------- ### init(CipherParameters params) Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/ECEncryptor-class.html Initializes the encryptor with the provided cipher parameters. ```APIDOC ### Method `void init(CipherParameters params)` ### Description Initializes the encryptor instance with the required cipher parameters before performing encryption operations. ### Parameters - **params** (CipherParameters) - Required - The configuration parameters for the cipher. ``` -------------------------------- ### int get keySize Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/KeyDerivator/keySize.html Retrieves the output size of the key for the current KeyDerivator instance. ```APIDOC ## Property: keySize ### Description Returns the output size of the key for the KeyDerivator. ### Signature `int get keySize` ### Returns - **int** - The size of the derived key. ``` -------------------------------- ### SubjectPublicKeyInfo constructor Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/SubjectPublicKeyInfo/SubjectPublicKeyInfo.html Initializes a new instance of the SubjectPublicKeyInfo class with optional public key metadata. ```APIDOC ## SubjectPublicKeyInfo constructor ### Description Creates a new instance of SubjectPublicKeyInfo to store public key information. ### Parameters - **algorithm** (String?) - Optional - The algorithm identifier. - **length** (int?) - Optional - The length of the key. - **sha1Thumbprint** (String?) - Optional - The SHA-1 thumbprint of the key. - **sha256Thumbprint** (String?) - Optional - The SHA-256 thumbprint of the key. - **bytes** (String?) - Optional - The raw bytes of the key. - **algorithmReadableName** (String?) - Optional - A human-readable name for the algorithm. - **parameter** (String?) - Optional - Key parameters. - **parameterReadableName** (String?) - Optional - A human-readable name for the parameters. - **exponent** (int?) - Optional - The exponent value for the key. ``` -------------------------------- ### Get digestSize property Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/Digest/digestSize.html Access the digestSize property to retrieve the output size in bytes. ```dart int get digestSize; ``` -------------------------------- ### Get outputBlockSize property Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/AsymmetricBlockCipher/outputBlockSize.html Retrieves the maximum output block size for the cipher implementation. ```dart int get outputBlockSize; ``` -------------------------------- ### Initialize ECPublicKey Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/ECPublicKey/ECPublicKey.html Constructs an ECPublicKey instance by providing the ECPoint Q and optional ECDomainParameters. ```dart ECPublicKey(this.Q, ECDomainParameters? parameters) : super(parameters); ``` -------------------------------- ### BigInt? get privateExponent Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/RSAPrivateKey/privateExponent.html Retrieves the private exponent (d) value from the RSA private key instance. ```APIDOC ## property privateExponent ### Description Returns the private exponent (d) of the RSA private key as a BigInt. Returns null if the exponent is not available. ### Signature `BigInt? get privateExponent` ``` -------------------------------- ### init(CipherParameters params) Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/ECDecryptor-class.html Initializes the decryptor with the provided cipher parameters. ```APIDOC ### init(CipherParameters params) #### Description Initializes the decryptor with the required cipher parameters. #### Parameters - **params** (CipherParameters) - Required - The parameters used to initialize the decryptor. ``` -------------------------------- ### bool get isCompressed Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/ECPoint/isCompressed.html Returns a boolean value indicating if the ECPoint instance is currently in a compressed format. ```APIDOC ## bool get isCompressed ### Description Returns a boolean value indicating whether the elliptic curve point is represented in a compressed format. ### Signature `bool get isCompressed` ### Returns - **bool** - True if the point is compressed, false otherwise. ``` -------------------------------- ### Initialize CertificationRequestInfo Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/CertificationRequestInfo/CertificationRequestInfo.html Constructor for creating a new instance of CertificationRequestInfo with optional parameters. ```dart CertificationRequestInfo({ this.subject, this.version, this.publicKeyInfo, this.extensions, }); ``` -------------------------------- ### bool get isInfinity Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/ECPoint/isInfinity.html A getter property that returns true if the ECPoint is the point at infinity, and false otherwise. ```APIDOC ## bool get isInfinity ### Description Returns a boolean value indicating whether the current ECPoint instance is the point at infinity. ### Signature `bool get isInfinity` ### Returns - **bool** - True if the point is at infinity, false otherwise. ``` -------------------------------- ### BasicOCSPResponse() Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/BasicOCSPResponse/BasicOCSPResponse.html Initializes a new instance of the BasicOCSPResponse class. ```APIDOC ## BasicOCSPResponse() ### Description Creates a new instance of the BasicOCSPResponse class. ### Parameters - **responseData** (OCSPResponseData?) - Optional - The OCSP response data to be associated with this instance. ``` -------------------------------- ### Initialize SubjectPublicKeyInfo Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/SubjectPublicKeyInfo/SubjectPublicKeyInfo.html Constructor for creating a new instance of SubjectPublicKeyInfo with optional fields. ```dart SubjectPublicKeyInfo({ this.algorithm, this.length, this.sha1Thumbprint, this.sha256Thumbprint, this.bytes, this.algorithmReadableName, this.parameter, this.parameterReadableName, this.exponent, }); ``` -------------------------------- ### int get byteLength Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/Digest/byteLength.html Retrieves the size in bytes of the internal buffer used by the digest compression function. ```APIDOC ## byteLength ### Description Returns the size in bytes of the internal buffer the digest applies its compression function to. ### Signature `int get byteLength` ``` -------------------------------- ### Initialize X509CertificateDataExtensions Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/X509CertificateDataExtensions/X509CertificateDataExtensions.html Constructor for creating an instance of X509CertificateDataExtensions with optional certificate parameters. ```dart X509CertificateDataExtensions({ this.subjectAlternativNames, this.extKeyUsage, this.keyUsage, this.cA, this.pathLenConstraint, this.vmc, this.cRLDistributionPoints, }); ``` -------------------------------- ### Define BEGIN_CRL constant Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/X509Utils/BEGIN_CRL-constant.html Defines the static constant string used to identify the start of an X509 CRL. ```dart static const BEGIN_CRL = '-----BEGIN X509 CRL-----'; ``` -------------------------------- ### pickOnly(value, {from, to}) Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/StringUtils/pickOnly.html Extracts a substring from the provided value starting from the 'from' index and ending at the 'to' index. ```APIDOC ## pickOnly(value, {from, to}) ### Description Picks only the required string portion from the provided value starting from the 'from' index and ending at the 'to' index. ### Signature String pickOnly(dynamic value, {int from = 1, int to = -1}) ### Parameters - **value** (dynamic) - Required - The input value to extract the substring from. - **from** (int) - Optional - The starting position (1-based index). Defaults to 1. - **to** (int) - Optional - The ending position. Defaults to -1 (end of string). ### Example ```dart pickOnly('123456789', from: 3, to: 7); // returns '34567' ``` ``` -------------------------------- ### void init(CipherParameters params) Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/KeyDerivator/init.html Initializes the key derivator with the provided cipher parameters. The specific type of CipherParameters depends on the underlying algorithm implementation. ```APIDOC ## void init(CipherParameters params) ### Description Initializes the key derivator with its initialization parameters. The type of CipherParameters depends on the algorithm being used. ### Parameters - **params** (CipherParameters) - Required - The initialization parameters specific to the algorithm implementation. ``` -------------------------------- ### int get hashCode Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/ECPrivateKey/hashCode.html Returns the hash code for the ECPrivateKey object, calculated based on its internal parameters and d values. ```APIDOC ## int get hashCode ### Description Returns a single integer representing the state of the ECPrivateKey object. This is used to ensure consistency when the object is used in hash-based collections. ### Signature `int get hashCode` ### Implementation ```dart @override int get hashCode { return parameters.hashCode + d.hashCode; } ``` ``` -------------------------------- ### Initialize TbsCertificate Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/TbsCertificate/TbsCertificate.html Constructor definition for creating a new TbsCertificate instance with required parameters. ```dart TbsCertificate({ required this.version, required this.serialNumber, required this.issuer, required this.validity, required this.subject, required this.subjectPublicKeyInfo, required this.signatureAlgorithm, required this.signatureAlgorithmReadableName, this.extensions, }); ``` -------------------------------- ### KeyParameter.offset Constructor Implementation Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/KeyParameter/KeyParameter.offset.html Initializes the key property by copying a slice of the provided Uint8List starting at the specified offset. ```dart KeyParameter.offset(Uint8List key, int keyOff, int keyLen) { this.key = Uint8List(keyLen); arrayCopy(key, keyOff, this.key, 0, keyLen); } ``` -------------------------------- ### Initialize Pkcs7CertificateData Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/Pkcs7CertificateData/Pkcs7CertificateData.html Use this constructor to create an instance of Pkcs7CertificateData with optional version, certificates, and content type parameters. ```dart Pkcs7CertificateData({this.version, this.certificates, this.contentType}); ``` -------------------------------- ### isDomainName(String s) Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/DomainUtils/isDomainName.html Checks if the provided string is a valid domain name. Returns false if the string starts with 'www.' or '*'. ```APIDOC ## isDomainName(String s) ### Description Checks if the given string `s` is a valid domain name. The method returns `false` if the string starts with `www.` or `*.`. ### Signature `bool isDomainName(String s)` ### Parameters - **s** (String) - The string to validate as a domain name. ### Returns - **bool** - Returns `true` if the string is a valid domain name, otherwise `false`. ``` -------------------------------- ### X509CertificatePublicKeyData constructor Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/X509CertificatePublicKeyData/X509CertificatePublicKeyData.html Initializes a new instance of X509CertificatePublicKeyData with optional certificate public key attributes. ```APIDOC ## X509CertificatePublicKeyData constructor ### Description Creates a new instance of the X509CertificatePublicKeyData class to store public key information from an X.509 certificate. ### Signature `X509CertificatePublicKeyData({String? algorithm, int? length, String? sha1Thumbprint, String? sha256Thumbprint, String? bytes, Uint8List? plainSha1, String? algorithmReadableName, String? parameter, String? parameterReadableName, int? exponent})` ### Parameters - **algorithm** (String?) - Optional - The algorithm used for the public key. - **length** (int?) - Optional - The length of the public key. - **sha1Thumbprint** (String?) - Optional - The SHA-1 thumbprint of the certificate. - **sha256Thumbprint** (String?) - Optional - The SHA-256 thumbprint of the certificate. - **bytes** (String?) - Optional - The raw bytes of the public key. - **plainSha1** (Uint8List?) - Optional - The plain SHA-1 hash of the key. - **algorithmReadableName** (String?) - Optional - A human-readable name for the algorithm. - **parameter** (String?) - Optional - Additional parameters for the key. - **parameterReadableName** (String?) - Optional - A human-readable name for the key parameter. - **exponent** (int?) - Optional - The exponent value for RSA keys. ``` -------------------------------- ### ParametersWithSalt constructor Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/ParametersWithSalt/ParametersWithSalt.html Initializes a new instance of ParametersWithSalt with the provided cipher parameters and salt. ```APIDOC ## ParametersWithSalt Constructor ### Description Creates a new instance of ParametersWithSalt, which wraps underlying cipher parameters with a specific salt value. ### Signature ParametersWithSalt(UnderlyingParameters parameters, Uint8List salt) ### Parameters - **parameters** (UnderlyingParameters) - The underlying cipher parameters to be used. - **salt** (Uint8List) - The salt value to be associated with the parameters. ``` -------------------------------- ### Initialize X509CertificateObject Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/X509CertificateObject/X509CertificateObject.html Basic implementation of the X509CertificateObject constructor. ```dart X509CertificateObject(this.data); ``` -------------------------------- ### Implementation of basicColorsFromHex Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/ColorUtils/basicColorsFromHex.html This method processes a hex string, ensuring it starts with a hash, and parses the RGB components into a map. ```dart static Map basicColorsFromHex(String hex) { hex = fillUpHex(hex); if (!hex.startsWith('#')) { hex = '#' + hex; } var R = int.parse(hex.substring(1, 3), radix: 16); var G = int.parse(hex.substring(3, 5), radix: 16); var B = int.parse(hex.substring(5, 7), radix: 16); return {BASIC_COLOR_RED: R, BASIC_COLOR_GREEN: G, BASIC_COLOR_BLUE: B}; } ``` -------------------------------- ### Initialize CrlExtensions Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/CrlExtensions/CrlExtensions.html Constructor for creating a new CrlExtensions instance with optional parameters. ```dart CrlExtensions({ this.authorityKeyIdentifier, this.crlNumber, }); ``` -------------------------------- ### Define BEGIN_RSA_PUBLIC_KEY constant Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/CryptoUtils/BEGIN_RSA_PUBLIC_KEY-constant.html Defines the static constant string used to identify the start of an RSA public key block. ```dart static const BEGIN_RSA_PUBLIC_KEY = '-----BEGIN RSA PUBLIC KEY-----'; ``` -------------------------------- ### Create a Mac instance Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/Mac/Mac.html Instantiates a MAC algorithm using the specified algorithm name from the registry. ```dart factory Mac(String algorithmName) => registry.create(algorithmName); ``` -------------------------------- ### Override hashCode implementation Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/ECPrivateKey/hashCode.html Example of overriding the hashCode property to incorporate object state, ensuring consistency with equality comparisons. ```dart @override int get hashCode { return parameters.hashCode + d.hashCode; } ``` -------------------------------- ### Initialize ECAsymmetricKey Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/ECAsymmetricKey/ECAsymmetricKey.html Use this constructor to create an asymmetric key instance with specific domain parameters. ```dart ECAsymmetricKey(this.parameters); ``` -------------------------------- ### int doOutput(Uint8List out, int outOff, int outLen) Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/Xof/doOutput.html Writes output data to the specified buffer starting at the given offset. ```APIDOC ## int doOutput(Uint8List out, int outOff, int outLen) ### Description Writes output data to a provided buffer. This is an abstract method that must be implemented by subclasses. ### Parameters - **out** (Uint8List) - The destination buffer for the output data. - **outOff** (int) - The offset in the destination buffer at which to start writing. - **outLen** (int) - The maximum number of bytes to write to the buffer. ### Returns - **int** - The number of bytes written to the buffer. ``` -------------------------------- ### Initialize AsymmetricKeyPair Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/AsymmetricKeyPair/AsymmetricKeyPair.html Constructor for creating an AsymmetricKeyPair instance with specified public and private keys. ```dart AsymmetricKeyPair(this.publicKey, this.privateKey); ``` -------------------------------- ### Perform HTTP Operations with HttpUtils Source: https://pub.dev/documentation/basic_utils/latest/index.html Provides methods for GET, POST, PUT, and DELETE requests, along with URL query parameter manipulation. ```dart Future getForFullResponse(String url, {Map? queryParameters, Map? headers}); Future> getForJson(String url, {Map? queryParameters, Map? headers}); Future getForString(String url, {Map? queryParameters, Map? headers}); Future postForFullResponse(String url, {String? body, Map? queryParameters, Map? headers}); Future> postForJson(String url, {String? body, Map? queryParameters, Map? headers}); Future postForString(String url, {String? body, Map? queryParameters, Map? headers}); Future putForFullResponse(String url, {String? body, Map? queryParameters, Map? headers}); Future> putForJson(String url, {String? body, Map? queryParameters, Map? headers}); Future putForString(String url, {String? body, Map? queryParameters, Map? headers}); Future? queryParameters, Map? headers}); Future> deleteForJson(String url, {Map? queryParameters, Map? headers}); Future deleteForString(String url, {Map? queryParameters, Map? headers}); Map? getQueryParameterFromUrl(String url); String addQueryParameterToUrl(String url, Map? queryParameters); ``` -------------------------------- ### Implementation of lookupRecord Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/DnsUtils/lookupRecord.html The core implementation of the lookupRecord method, which constructs query parameters and performs an HTTP GET request to the configured DNS provider. ```dart static Future?> lookupRecord(String name, RRecordType type, {bool dnssec = false, DnsApiProvider provider = DnsApiProvider.GOOGLE}) async { var queryParameters = {}; queryParameters.putIfAbsent('name', () => name); queryParameters.putIfAbsent('type', () => _getTypeFromType(type)); queryParameters.putIfAbsent('dnssec', () => dnssec.toString()); assert(_dnsApiProviderUrl.length == DnsApiProvider.values.length); var _baseUrl = _dnsApiProviderUrl[provider]; var headers = {'Accept': 'application/dns-json'}; var body = await HttpUtils.getForJson(_baseUrl!, queryParameters: queryParameters, headers: headers); var response = ResolveResponse.fromJson(body); return response.answer; } ``` -------------------------------- ### Initialize CertificateListData Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/CertificateListData/CertificateListData.html Constructor for creating a new instance of CertificateListData with optional certificate metadata. ```dart CertificateListData({ this.extensions, this.issuer, this.nextUpdate, this.revokedCertificates, this.signatureAlgorithm, this.signatureAlgorithmReadableName, this.thisUpdate, this.version, }); ``` -------------------------------- ### Implement ecSign static method Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/CryptoUtils/ecSign.html Initializes an ECDSASigner with the specified algorithm and generates a signature using the provided private key and data. ```dart static ECSignature ecSign(ECPrivateKey privateKey, Uint8List dataToSign, {String algorithmName = 'SHA-1/ECDSA'}) { var signer = Signer(algorithmName) as ECDSASigner; var params = ParametersWithRandom( PrivateKeyParameter(privateKey), getSecureRandom()); signer.init(true, params); var sig = signer.generateSignature(dataToSign) as ECSignature; return sig; } ``` -------------------------------- ### HttpUtils Source: https://pub.dev/documentation/basic_utils/latest/index.html Helper class for performing HTTP operations like GET, POST, PUT, and DELETE requests, as well as URL query parameter manipulation. ```APIDOC ## HttpUtils ### Methods - `getForFullResponse(String url, {Map? queryParameters, Map? headers})` - `getForJson(String url, {Map? queryParameters, Map? headers})` - `getForString(String url, {Map? queryParameters, Map? headers})` - `postForFullResponse(String url, {String? body, Map? queryParameters, Map? headers})` - `postForJson(String url, {String? body, Map? queryParameters, Map? headers})` - `postForString(String url, {String? body, Map? queryParameters, Map? headers})` - `putForFullResponse(String url, {String? body, Map? queryParameters, Map? headers})` - `putForJson(String url, {String? body, Map? queryParameters, Map? headers})` - `putForString(String url, {String? body, Map? queryParameters, Map? headers})` - `deleteForFullResponse(String url, {Map? queryParameters, Map? headers})` - `deleteForJson(String url, {Map? queryParameters, Map? headers})` - `deleteForString(String url, {Map? queryParameters, Map? headers})` - `getQueryParameterFromUrl(String url)` - `addQueryParameterToUrl(String url, Map? queryParameters)` ``` -------------------------------- ### Implement rsaSign method Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/CryptoUtils/rsaSign.html Initializes an RSASigner with the specified algorithm and generates a signature from the provided data. ```dart static Uint8List rsaSign(RSAPrivateKey privateKey, Uint8List dataToSign, {String algorithmName = 'SHA-256/RSA'}) { var signer = Signer(algorithmName) as RSASigner; signer.init(true, PrivateKeyParameter(privateKey)); var sig = signer.generateSignature(dataToSign); return sig.bytes; } ``` -------------------------------- ### int doFinal(Uint8List out, int outOff) Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/Mac/doFinal.html Stores the MAC of previously given data in the provided buffer starting at the specified offset and returns the size of the digest. ```APIDOC ## int doFinal(Uint8List out, int outOff) ### Description Stores the MAC of previously given data in buffer `out` starting at offset `outOff`. This method returns the size of the digest. ### Parameters - **out** (Uint8List) - Required - The buffer where the MAC will be stored. - **outOff** (int) - Required - The offset in the buffer where the storage begins. ### Returns - **int** - The size of the digest. ``` -------------------------------- ### X509CertificateObject(X509CertificateData? data) Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/X509CertificateObject/X509CertificateObject.html Initializes a new instance of the X509CertificateObject class. ```APIDOC ## X509CertificateObject(X509CertificateData? data) ### Description Creates a new instance of the X509CertificateObject. This constructor accepts an optional parameter containing the certificate data. ### Parameters - **data** (X509CertificateData?) - Optional - The certificate data to initialize the object with. ``` -------------------------------- ### getForFullResponse(String url, {Map? queryParameters, Map? headers}) Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/HttpUtils/getForFullResponse.html Sends an HTTP GET request to the specified URL and returns the full Response object. ```APIDOC ## getForFullResponse ### Description Sends a HTTP GET request to the given `url` with optional `queryParameters` and `headers`. Returns the full `Response` object. ### Signature `Future getForFullResponse(String url, {Map? queryParameters, Map? headers})` ### Parameters - **url** (String) - Required - The target URL for the GET request. - **queryParameters** (Map) - Optional - Query parameters to append to the URL. - **headers** (Map) - Optional - HTTP headers to include in the request. ``` -------------------------------- ### CertificateListData() Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/CertificateListData/CertificateListData.html Initializes a new instance of the CertificateListData class with optional certificate metadata. ```APIDOC ## CertificateListData() ### Description Creates a new instance of CertificateListData to hold CRL information. ### Parameters - **extensions** (CrlExtensions?) - Optional - CRL extensions data. - **issuer** (Map?) - Optional - Map of issuer information. - **nextUpdate** (DateTime?) - Optional - The date and time for the next scheduled update. - **revokedCertificates** (List?) - Optional - A list of revoked certificates. - **signatureAlgorithm** (String?) - Optional - The identifier for the signature algorithm. - **signatureAlgorithmReadableName** (String?) - Optional - The human-readable name of the signature algorithm. - **thisUpdate** (DateTime?) - Optional - The date and time of the current update. - **version** (int?) - Optional - The version number of the CRL. ``` -------------------------------- ### CertificationRequestInfo() Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/CertificationRequestInfo/CertificationRequestInfo.html Initializes a new instance of the CertificationRequestInfo class with optional parameters. ```APIDOC ## CertificationRequestInfo() ### Description Creates a new instance of CertificationRequestInfo with optional configuration fields. ### Parameters - **subject** (Map?) - Optional - The subject information for the certificate request. - **version** (int?) - Optional - The version of the certificate request. - **publicKeyInfo** (SubjectPublicKeyInfo?) - Optional - The public key information associated with the request. - **extensions** (CertificateSigningRequestExtensions?) - Optional - Additional extensions for the certificate signing request. ``` -------------------------------- ### getForJson(String url, {Map? queryParameters, Map? headers}) Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/HttpUtils/getForJson.html Sends a HTTP GET request to the specified URL and returns the decoded JSON response as a Map. ```APIDOC ## getForJson ### Description Sends a HTTP GET request to the given `url` with optional `queryParameters` and `headers`. The response is automatically decoded from JSON into a `Map`. ### Signature `Future> getForJson(String url, {Map? queryParameters, Map? headers})` ### Parameters - **url** (String) - Required - The target URL for the GET request. - **queryParameters** (Map) - Optional - Key-value pairs to be appended to the URL as query parameters. - **headers** (Map) - Optional - HTTP headers to include in the request. ### Returns - **Future>** - A future that resolves to the decoded JSON response body. ``` -------------------------------- ### getForString(String url, {Map? queryParameters, Map? headers}) Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/HttpUtils/getForString.html Sends a HTTP GET request to the given url with the given queryParameters and headers. Returns the response as a string. ```APIDOC ## getForString ### Description Sends a HTTP GET request to the specified URL and returns the response body as a String. ### Signature `Future getForString(String url, {Map? queryParameters, Map? headers})` ### Parameters - **url** (String) - Required - The target URL for the GET request. - **queryParameters** (Map) - Optional - A map of query parameters to append to the URL. - **headers** (Map) - Optional - A map of HTTP headers to include in the request. ### Returns - **Future** - A future that resolves to the response body as a string. ``` -------------------------------- ### ParametersWithSaltConfiguration(UnderlyingParameters parameters, SecureRandom random, int saltLength) Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/ParametersWithSaltConfiguration-class.html Constructor for creating a new instance of ParametersWithSaltConfiguration. ```APIDOC ## Constructor: ParametersWithSaltConfiguration ### Description Creates a new configuration object containing the underlying cipher parameters, a secure random generator, and the specified salt length. ### Signature `ParametersWithSaltConfiguration(UnderlyingParameters parameters, SecureRandom random, int saltLength)` ### Parameters - **parameters** (UnderlyingParameters) - The underlying cipher parameters. - **random** (SecureRandom) - The SecureRandom instance to be used. - **saltLength** (int) - The length of the salt. ``` -------------------------------- ### int get hashCode Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/ECPublicKey/hashCode.html Returns the hash code for the ECPublicKey object. This property is overridden to ensure that objects considered equal by the equality operator also share the same hash code, which is required for correct usage in hash-based collections like Set and Map. ```APIDOC ## int get hashCode ### Description Returns the hash code for the ECPublicKey object. This property is calculated based on the object's internal state (parameters and Q) to maintain consistency with the equality operator. ### Signature `int get hashCode` ### Implementation ```dart @override int get hashCode { return parameters.hashCode + Q.hashCode; } ``` ``` -------------------------------- ### Import basic_utils Source: https://pub.dev/documentation/basic_utils/latest/index.html Import the library to access utility classes. ```dart import 'package:basic_utils/basic_utils.dart'; ``` -------------------------------- ### Initialize BasicOCSPResponse Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/BasicOCSPResponse/BasicOCSPResponse.html Use this constructor to create a new BasicOCSPResponse instance with optional response data. ```dart BasicOCSPResponse({this.responseData}); ``` -------------------------------- ### init Method Implementation Signature Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/PBEParametersGenerator/init.html Defines the required parameters for the init method implementation. ```dart void init(Uint8List password, Uint8List salt, int iterationCount); ``` -------------------------------- ### Initialize OCSPSingleResponse Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/OCSPSingleResponse/OCSPSingleResponse.html Use this constructor to create a new instance of OCSPSingleResponse by providing the certificate status and the update time. ```dart OCSPSingleResponse(this.certStatus, this.thisUpdate); ``` -------------------------------- ### Initialize ECDHBasicAgreement Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/ECDHBasicAgreement/init.html Initializes the agreement engine by setting the provided ECPrivateKey. ```dart @override void init(ECPrivateKey key) { this.key = key; } ``` -------------------------------- ### Implement swatchColor method Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/ColorUtils/swatchColor.html Generates a list of hex color strings by calculating shades based on the provided percentage and amount parameters. ```dart static List swatchColor(String hex, {double percentage = 15, int amount = 5}) { hex = fillUpHex(hex); var colors = []; for (var i = 1; i <= amount; i++) { colors.add(shadeColor(hex, (6 - i) * percentage)); } colors.add(hex); for (var i = 1; i <= amount; i++) { colors.add(shadeColor(hex, (0 - i) * percentage)); } return colors; } ``` -------------------------------- ### DESParameters(Uint8List key) Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/DESParameters-class.html Constructor for initializing DESParameters with a specific key. ```APIDOC ## Constructor: DESParameters(Uint8List key) ### Description Initializes a new instance of the DESParameters class with the provided key. ### Parameters - **key** (Uint8List) - Required - The DES key to be used for cryptographic operations. ``` -------------------------------- ### Initialize ParametersWithSalt Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/ParametersWithSalt/ParametersWithSalt.html Constructor for creating a new instance of ParametersWithSalt with underlying cipher parameters and a salt. ```dart ParametersWithSalt(this.parameters, this.salt); ``` -------------------------------- ### Define BEGIN_CERT constant Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/X509Utils/BEGIN_CERT-constant.html This constant represents the standard PEM header for X.509 certificates. ```dart static const BEGIN_CERT = '-----BEGIN CERTIFICATE-----'; ``` -------------------------------- ### DESParameters constructor Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/DESParameters/DESParameters.html Initializes a new instance of the DESParameters class with a provided key. ```APIDOC ## DESParameters constructor ### Signature DESParameters(Uint8List key) ### Description Creates a new instance of DESParameters using the specified key. ### Parameters - **key** (Uint8List) - Required - The key used for DES operations. ``` -------------------------------- ### PublicKeyParameter constructor Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/PublicKeyParameter/PublicKeyParameter.html Initializes a new PublicKeyParameter instance with the specified public key. ```APIDOC ## PublicKeyParameter constructor ### Description Creates a new instance of PublicKeyParameter, assigning the provided public key to the instance. ### Signature PublicKeyParameter(PublicKey key) ### Parameters - **key** (PublicKey) - Required - The public key to be associated with this parameter. ``` -------------------------------- ### Initialize X509CertificatePublicKeyData Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/X509CertificatePublicKeyData/X509CertificatePublicKeyData.html Use this constructor to instantiate the data object with specific certificate public key attributes. ```dart X509CertificatePublicKeyData({ this.algorithm, this.length, this.sha1Thumbprint, this.sha256Thumbprint, this.bytes, this.plainSha1, this.parameter, this.parameterReadableName, this.exponent, }); ``` -------------------------------- ### Initialize static Client instance Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/HttpUtils/client.html Defines the static Client instance used for HTTP requests. ```dart static Client client = Client(); ``` -------------------------------- ### Pkcs7CertificateData() Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/Pkcs7CertificateData/Pkcs7CertificateData.html Initializes a new instance of the Pkcs7CertificateData class. ```APIDOC ## Pkcs7CertificateData() ### Description Creates a new instance of Pkcs7CertificateData with optional configuration parameters. ### Parameters - **version** (int?) - Optional - The version of the PKCS#7 data. - **certificates** (List?) - Optional - A list of X509CertificateData objects. - **contentType** (String?) - Optional - The content type identifier. ### Constructor Signature Pkcs7CertificateData({int? version, List? certificates, String? contentType}) ``` -------------------------------- ### X509Utils Static Methods Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/X509Utils-class.html The X509Utils class provides various static methods for certificate management. Below are the primary operations available. ```APIDOC ## Static Methods ### buildOCSPRequest(String pem, {String? intermediate}) Builds an OCSPRequest from the given PEM and optional intermediate certificate. ### checkChain(List x509) Checks a given certificate chain by verifying issuer/subject values and signatures for each pair. ### checkCsrSignature(String pem) Checks the signature of the given CSR against its content. ### checkX509Signature(String pem, {String? parent}) Checks the signature of the given PEM using the public key from the parent. If parent is null, the PEM's own public key is used. ### csrFromPem(String pem) Parses a CSR PEM string into a CertificateSigningRequestData object. ### generateEccCsrPem(Map attributes, ECPrivateKey privateKey, ECPublicKey publicKey, {List? san, String signingAlgorithm}) Generates an Elliptic Curve CSR PEM. ### generateRsaCsrPem(Map attributes, RSAPrivateKey privateKey, RSAPublicKey publicKey, {List? san, String signingAlgorithm}) Generates an RSA CSR PEM. ### generateSelfSignedCertificate(PrivateKey privateKey, String csr, int days, ...) Generates a self-signed certificate based on the provided private key and CSR. ### x509CertificateFromPem(String pem) Parses a PEM string into an X509CertificateData object. ``` -------------------------------- ### Implementation of formatKeyString Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/X509Utils/formatKeyString.html The core logic for chunking a key string and applying headers and footers. ```dart static String formatKeyString(String key, String begin, String end, {int chunkSize = 64, String lineDelimiter = '\n'}) { var sb = StringBuffer(); var chunks = StringUtils.chunk(key, chunkSize); if (StringUtils.isNotNullOrEmpty(begin)) { sb.write(begin + lineDelimiter); } for (var s in chunks) { sb.write(s + lineDelimiter); } if (StringUtils.isNotNullOrEmpty(end)) { sb.write(end); return sb.toString(); } else { var tmp = sb.toString(); return tmp.substring(0, tmp.lastIndexOf(lineDelimiter)); } } ``` -------------------------------- ### PrivateKeyParameter constructor Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/PrivateKeyParameter/PrivateKeyParameter.html Initializes a new PrivateKeyParameter instance with the specified private key. ```APIDOC ## PrivateKeyParameter constructor ### Description Creates a new instance of PrivateKeyParameter, which wraps a PrivateKey object. ### Parameters - **key** (PrivateKey) - Required - The private key to be associated with this parameter. ``` -------------------------------- ### AsymmetricKeyParameter constructor Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/AsymmetricKeyParameter/AsymmetricKeyParameter.html Initializes a new instance of the AsymmetricKeyParameter class with the provided asymmetric key. ```APIDOC ## Constructor: AsymmetricKeyParameter ### Description Creates a new instance of AsymmetricKeyParameter, which holds an asymmetric key of type T. ### Signature AsymmetricKeyParameter(T key) ### Parameters - **key** (T) - Required - The asymmetric key to be associated with this parameter. ``` -------------------------------- ### Accessing the BEGIN_PKCS7 constant Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/X509Utils/BEGIN_PKCS7-constant.html This constant represents the standard PEM header for PKCS7 content. ```dart static const BEGIN_PKCS7 = '-----BEGIN PKCS7-----'; ``` -------------------------------- ### ParametersWithIV constructor Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/ParametersWithIV/ParametersWithIV.html Initializes a new instance of ParametersWithIV with the specified underlying parameters and initialization vector. ```APIDOC ## ParametersWithIV constructor ### Description Creates a new instance of the ParametersWithIV class, which bundles cryptographic parameters with an initialization vector (IV). ### Signature ParametersWithIV(UnderlyingParameters? parameters, Uint8List iv) ### Parameters - **parameters** (UnderlyingParameters?) - Required - The underlying cipher parameters to be used. - **iv** (Uint8List) - Required - The initialization vector (IV) to be associated with the parameters. ``` -------------------------------- ### Initialize Domain object Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/Domain/Domain.html The constructor accepts optional sld, tld, and subTld parameters and delegates their assignment to internal setter methods. ```dart Domain({this.sld, this.tld, this.subTld}) { _setTld(tld); _setSld(sld); _setSubTld(subTld); } ``` -------------------------------- ### KeyParameter(Uint8List key) Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/KeyParameter/KeyParameter.html Constructor for creating a new KeyParameter instance. ```APIDOC ## KeyParameter(Uint8List key) ### Description Creates a new instance of KeyParameter with the provided key. ### Parameters - **key** (Uint8List) - Required - The key data to be used by the parameter. ``` -------------------------------- ### Initialize ResolveResponse Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/ResolveResponse/ResolveResponse.html Constructor for creating a new instance of ResolveResponse with optional DNS response fields. ```dart ResolveResponse( {this.status, this.tc, this.rd, this.ra, this.ad, this.cd, this.question, this.answer, this.comment}); ``` -------------------------------- ### Initialize KeyParameter Source: https://pub.dev/documentation/basic_utils/latest/basic_utils/KeyParameter/KeyParameter.html Use this constructor to create a new instance of KeyParameter with a provided key. ```dart KeyParameter(this.key); ```