I found this code snippet, here it is serializing an RSA private key into an encrypted cipher text. I wanted to know which algorithm in this code serialization.BestAvailableEncryption(b'mypassword') will be used to do so.
from cryptography.hazmat.primitives import serialization
pem = private_key.private_bytes(
encoding=serialization.Encoding.PEM,
format=serialization.PrivateFormat.PKCS8,
encryption_algorithm=serialization.BestAvailableEncryption(b'mypassword')
)