def test_encryption_current_key(server_key_fp): """ Encrypts the encryption key for the encryption key Args: server_key_fp: (str): write your description """ data = rsa.encrypt(server_key_fp(old=False), b"testdata") # We can't verify the data is actually valid because we don't have # the decryption keys assert data is not None and len(data) == 256
def test_encryption_allowed_old_key(server_key_fp): """ Encrypt the encryption key with the encryption key. Args: server_key_fp: (str): write your description """ data = rsa.encrypt(server_key_fp(old=True), b"testdata", use_old=True) # We can't verify the data is actually valid because we don't have # the decryption keys assert data is not None and len(data) == 256
def test_encryption_old_key(server_key_fp): """Test for #1324.""" assert rsa.encrypt(server_key_fp(old=True), b"testdata") is None
def test_encryption_inv_key(): """Test for #1324.""" assert rsa.encrypt("invalid", b"testdata") is None
def test_encryption_current_key(server_key_fp): data = rsa.encrypt(server_key_fp(old=False), b"testdata") # We can't verify the data is actually valid because we don't have # the decryption keys assert data is not None and len(data) == 256
def test_encryption_allowed_old_key(server_key_fp): data = rsa.encrypt(server_key_fp(old=True), b"testdata", use_old=True) # We can't verify the data is actually valid because we don't have # the decryption keys assert data is not None and len(data) == 256