signAdbTokenPayload method

Uint8List signAdbTokenPayload(
  1. Uint8List payload
)

Implementation

Uint8List signAdbTokenPayload(Uint8List payload) {
  final signer = RSASigner(SHA1Digest(), '06052b0e03021a');

  signer.init(true, PrivateKeyParameter<RSAPrivateKey>(_keyPair.privateKey));

  final paddedPayload = Uint8List.fromList([...SIGNATURE_PADDING, ...payload]);

  return signer.generateSignature(paddedPayload).bytes;
}