Module passwords

Source
Expand description

Support for password entries in the keychain. Works on both iOS and macOS.

If you want the extended keychain facilities only available on macOS, use the version of these functions in the macOS extensions module.

Functionsยง

delete_generic_password
Delete the generic password keychain entry for the given service and account. If none exists, fails with error code errSecItemNotFound.
delete_internet_password
Delete the internet password for the given endpoint parameters. If none exists, fails with error code errSecItemNotFound.
get_generic_password
Get the generic password for the given service and account. If no matching keychain entry exists, fails with error code errSecItemNotFound.
get_internet_password
Get the internet password for the given endpoint parameters. If no matching keychain entry exists, fails with error code errSecItemNotFound.
set_generic_password
Set a generic password for the given service and account. Creates or updates a keychain entry.
set_generic_password_options
Set a generic password using the given password options. Creates or updates a keychain entry.
set_internet_password
Set an internet password for the given endpoint parameters. Creates or updates a keychain entry.