Platforms to show: All Mac Windows Linux Cross-Platform

Back to KeychainMBS class.

KeychainMBS.AddGenericPassword(serviceName as string, accountName as string, password as memoryblock) as KeychainItemMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Keychain MBS MacClassic Plugin 13.1 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Adds a new generic password to a keychain.

See AddGenericPassword in KeychainManagerMBS for details.

See also:

KeychainMBS.AddGenericPassword(serviceName as string, accountName as string, password as string) as KeychainItemMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Keychain MBS MacClassic Plugin 13.1 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Adds a new generic password to a keychain.

See AddGenericPassword in KeychainManagerMBS for details.

See also:

KeychainMBS.AllItems(itemClass as string) as KeychainItemMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Keychain MBS MacClassic Plugin 13.1 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Queries all items.

Keychain: If not nil, searches only this keychain.
ItemClass: The item class to find. For example kSecGenericPasswordItemClass.
Lasterror is set.
Returns array of keychain items.

KeychainMBS.Delete

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Keychain MBS MacClassic Plugin 13.1 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Deletes one or more keychains from the default keychain search list, and removes the keychain itself if it is a file.

Lasterror is set.

The keychain may be a file stored locally, a smart card, or retrieved from a network server using non-file-based database protocols. This function deletes the keychain only if it is a local file.

KeychainMBS.FindGenericItem(serviceName as string, accountName as string) as KeychainItemMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Keychain MBS MacClassic Plugin 13.1 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Finds the first generic keychain item based on the attributes passed.

See KeychainManagerMBS.FindGenericItem for details.

KeychainMBS.FindGenericPassword(serviceName as string, accountName as string, byref password as memoryblock) as KeychainItemMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Keychain MBS MacClassic Plugin 13.1 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Finds the first generic password based on the attributes passed.

See KeychainManagerMBS.FindGenericPassword for details.

KeychainMBS.FindInternetItem(serverName as string, securityDomain as string, accountName as string, path as string, port as Integer, protocol as string, authenticationType as string) as KeychainItemMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Keychain MBS MacClassic Plugin 13.1 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Finds the first Internet password item based on the attributes passed.

See KeychainManagerMBS.FindInternetPassword for details.

KeychainMBS.FindInternetPassword(serverName as string, securityDomain as string, accountName as string, path as string, port as Integer, protocol as string, authenticationType as string, byref password as memoryblock) as KeychainItemMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Keychain MBS MacClassic Plugin 13.1 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Finds the first Internet password based on the attributes passed.

See KeychainManagerMBS.FindInternetPassword for details.

KeychainMBS.IsUnlocked as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Keychain MBS MacClassic Plugin 13.1 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns true if keychain is unlocked.
Example
MsgBox str(KeychainManagerMBS.Default.IsUnlocked)

Lasterror is set.

KeychainMBS.Lock

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Keychain MBS MacClassic Plugin 13.1 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Locks a keychain.

Your application should not call this function unless you are responding to a user's request to lock a keychain. In general, you should leave the keychain unlocked so that the user does not have to unlock it again in another application.
Lasterror is set.

KeychainMBS.Name as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Keychain MBS MacClassic Plugin 13.1 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Determines the file name of a keychain.
Example
MsgBox KeychainManagerMBS.Default.Name

Similar to path, but name without file extension only.
Lasterror is set.

KeychainMBS.Path as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Keychain MBS MacClassic Plugin 13.1 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Determines the path of a keychain.
Example
MsgBox KeychainManagerMBS.Default.Path

Returns POSIX path of the keychain as a UTF-8 encoded string.
Lasterror is set.

KeychainMBS.SetDefault

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Keychain MBS MacClassic Plugin 13.1 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Sets the default keychain.

Lasterror is set.
In most cases, your application should not need to set the default keychain, because this is a choice normally made by the user. You may call this function to change where a password or other keychain items are added, but since this is a user choice, you should set the default keychain back to the user specified keychain when you are done.

KeychainMBS.Settings as KeychainSettingsMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Keychain MBS MacClassic Plugin 13.1 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Obtains or sets a keychain's settings.
Example
dim DefaultKeychain as KeychainMBS = KeychainManagerMBS.Default
dim settings as KeychainSettingsMBS = DefaultKeychain.Settings
MsgBox str(settings.useLockInterval)

Lasterror is set.
(Read and Write computed property)

KeychainMBS.Status as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Keychain MBS MacClassic Plugin 13.1 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Retrieves status information of a keychain.
Example
dim values() as string
dim DefaultKeychain as KeychainMBS = KeychainManagerMBS.Default
dim status as Integer = DefaultKeychain.status

if BitwiseAnd(status, KeychainMBS.StatusUnlocked) = KeychainMBS.StatusUnlocked then
values.Append "unlocked"
else
values.Append "locked"
end if

if BitwiseAnd(status, KeychainMBS.StatusReadable) = KeychainMBS.StatusReadable then
values.Append "readable"
else
values.Append "not readable"
end if

if BitwiseAnd(status, KeychainMBS.StatusWritable) = KeychainMBS.StatusWritable then
values.Append "writable"
else
values.Append "not writable"
end if

MsgBox Join(values, ", ")

Lasterror is set.
This function retrieves the status of a specified keychain. You can use this function to determine if the keychain is unlocked, readable, or writable. Note that the lock status of a keychain can change at any time due to user or system activity. Because the system automatically prompts the user to unlock a keychain when necessary, you do not usually have to worry about the lock status of a keychain.

KeychainMBS.Unlock

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Keychain MBS MacClassic Plugin 13.1 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Unlocks a keychain.

In most cases, your application does not need to call this function directly, since most Keychain Services functions that require an unlocked keychain do so for you. If your application needs to verify that a keychain is unlocked, call the function GetStatus.
Lasterror is set.

See also:

KeychainMBS.Unlock(password as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Keychain MBS MacClassic Plugin 13.1 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Unlocks a keychain.

password: The password to use.
In most cases, your application does not need to call this function directly, since most Keychain Services functions that require an unlocked keychain do so for you. If your application needs to verify that a keychain is unlocked, call the function GetStatus.
Lasterror is set.

See also:

The items on this page are in the following plugins: MBS MacClassic Plugin.


The biggest plugin in space...