PeerId.fromKeys constructor
Implementation
factory PeerId.fromKeys({
required Uint8List encryptionKey,
required Uint8List signKey,
}) {
if (encryptionKey.length != _keyLength) {
throw const FormatException('Encryption key length is invalid.');
}
if (signKey.length != _keyLength) {
throw const FormatException('Signing key length is invalid.');
}
final builder = BytesBuilder(copy: false)
..add(encryptionKey)
..add(signKey);
return PeerId(value: builder.toBytes());
}