openssh_key.cipher.none.NoneCipher

class openssh_key.cipher.none.NoneCipher

Bases: openssh_key.cipher.common.Cipher

Null encryption.

__init__()

Methods

__init__()

decrypt(kdf, passphrase, cipher_bytes)

Returns the ciphertext bytes as given.

encrypt(kdf, passphrase, plain_bytes)

Returns the plaintext bytes as given.

get_block_size()

The value 8, the cipher block size OpenSSH uses to pad private bytes under null encryption.

Attributes

BLOCK_SIZE

The block size for this cipher.

classmethod decrypt(kdf, passphrase, cipher_bytes)

Returns the ciphertext bytes as given.

Parameters
  • kdf_result – Ignored.

  • cipher_bytes (bytes) – Ciphertext bytes to be returned.

Return type

bytes

Returns

The given ciphertext bytes.

classmethod encrypt(kdf, passphrase, plain_bytes)

Returns the plaintext bytes as given.

Parameters
  • kdf_result – Ignored.

  • plain_bytes (bytes) – Plaintext bytes to be returned.

Return type

bytes

Returns

The given plaintext bytes.

classmethod get_block_size()

The value 8, the cipher block size OpenSSH uses to pad private bytes under null encryption.

Return type

int