adb.sign_cryptography module

ADB authentication using the cryptography package.

Contents

class adb.sign_cryptography.CryptographySigner(rsa_key_path)[source]

Bases: adb.adb_protocol.AuthSigner

AuthSigner using cryptography.io.

Warning

This is currently broken!

_images/adb.sign_cryptography.CryptographySigner.CALL_GRAPH.svg
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