adb_shell.auth.sign_pycryptodome module

ADB authentication using pycryptodome.

Contents

class adb_shell.auth.sign_pycryptodome.PycryptodomeAuthSigner(rsa_key_path=None)[source]

Bases: object

AuthSigner using the pycryptodome package.

Parameters:

rsa_key_path (str, None) – The path to the private key

public_key

The contents of the public key file

Type:

str

rsa_key

The contents of theprivate key

Type:

Crypto.PublicKey.RSA.RsaKey

GetPublicKey()[source]

Returns the public key in PEM format without headers or newlines.

Returns:

self.public_key – The contents of the public key file

Return type:

str

Sign(data)[source]

Signs given data using a private key.

Parameters:

data (bytes, bytearray) – The data to be signed

Returns:

The signed data

Return type:

bytes