adb_shell.auth.sign_cryptography module

ADB authentication using the cryptography package.

Contents

class adb_shell.auth.sign_cryptography.CryptographySigner(rsa_key_path)[source]

Bases: object

AuthSigner using cryptography.io.

Parameters:

rsa_key_path (str) – The path to the private key.

public_key

The contents of the public key file

Type:

str

rsa_key

The loaded private key

Type:

cryptography.hazmat.backends.openssl.rsa._RSAPrivateKey

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 (TODO) – TODO

Returns:

The signed data

Return type:

TODO