Top Description Fields Constructors Methods
com.github.javakeyring.internal.osx

public Class OsxKeychainBackend

extends Object
implements KeyringBackend
Class Inheritance
All Implemented Interfaces
com.github.javakeyring.internal.KeyringBackend, java.lang.AutoCloseable
Imports
java.nio.charset.Charset, com.github.javakeyring.BackendNotSupportedException, .PasswordAccessException, com.github.javakeyring.internal.KeyringBackend, com.sun.jna.Pointer

Keyring backend which uses legacy OS X Keychain.

Field Summary

Modifier and TypeField and Description
private final NativeLibraryManager

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
close()

Implements java.lang.AutoCloseable.close.

Closes this resource, relinquishing any underlying resources.

private String
convertErrorCodeToMessage(int
OSStat to be converted
errorCode
)

Converts OSStat to error message.

public void
deletePassword(String
Service name
service
,
String
Account name
account
)

Implements com.github.javakeyring.internal.KeyringBackend.deletePassword.

Delete a password from the key store.

public String

Returns:

Password related to specified service and account
getPassword
(String
Service name
service
,
String
Account name
account
)

Implements com.github.javakeyring.internal.KeyringBackend.getPassword.

Gets password from key store.

public void
setPassword(String
Service name
service
,
String
Account name
account
,
String
Password
password
)

Implements com.github.javakeyring.internal.KeyringBackend.setPassword.

Sets password to key store.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

nativeLibrariesback to summary
private final NativeLibraryManager nativeLibraries

Constructor Detail

OsxKeychainBackendback to summary
public OsxKeychainBackend() throws BackendNotSupportedException

Method Detail

closeback to summary
public void close() throws Exception

Implements java.lang.AutoCloseable.close.

Doc from java.lang.AutoCloseable.close.

Closes this resource, relinquishing any underlying resources. This method is invoked automatically on objects managed by the try-with-resources statement.

Annotations
@Override
Exceptions
Exception:
if this resource cannot be closed
convertErrorCodeToMessageback to summary
private String convertErrorCodeToMessage(int errorCode)

Converts OSStat to error message.

Parameters
errorCode:int

OSStat to be converted

deletePasswordback to summary
public void deletePassword(String service, String account) throws PasswordAccessException

Implements com.github.javakeyring.internal.KeyringBackend.deletePassword.

Delete a password from the key store.

Parameters
service:String

Service name

account:String

Account name

Exceptions
PasswordAccessException:
Thrown when an error happened while saving the password
getPasswordback to summary
public String getPassword(String service, String account) throws PasswordAccessException

Implements com.github.javakeyring.internal.KeyringBackend.getPassword.

Gets password from key store.

Parameters
service:String

Service name

account:String

Account name

Returns:String

Password related to specified service and account

Annotations
@Override
Exceptions
PasswordAccessException:
Thrown when an error happened while getting password
setPasswordback to summary
public void setPassword(String service, String account, String password) throws PasswordAccessException

Implements com.github.javakeyring.internal.KeyringBackend.setPassword.

Sets password to key store.

Parameters
service:String

Service name

account:String

Account name

password:String

Password

Annotations
@Override
Exceptions
PasswordAccessException:
Thrown when an error happened while saving the password