Class SealdSSKSPasswordPlugin
-
- All Implemented Interfaces:
public final class SealdSSKSPasswordPluginThe SealdSSKSPassword class allows to use the SSKS key storage service to store Seald identities easily and securely, encrypted by a user password.
-
-
Constructor Summary
Constructors Constructor Description SealdSSKSPasswordPlugin(String apiURL, String appId)
-
Method Summary
Modifier and Type Method Description final UnitsaveIdentityFromPassword(String userId, String password, ByteArray identity)Save the given identity for the given userId, encrypted with the given password. final UnitsaveIdentityFromPasswordAsync(String userId, String password, ByteArray identity)Save the given identity for the given userId, encrypted with the given password. final UnitsaveIdentityFromRawKeys(String userId, String rawStorageKey, ByteArray rawEncryptionKey, ByteArray identity)Save the given identity for the given userId, encrypted with the given raw keys. final UnitsaveIdentityFromRawKeysAsync(String userId, String rawStorageKey, ByteArray rawEncryptionKey, ByteArray identity)Save the given identity for the given userId, encrypted with the given raw keys. final ByteArrayretrieveIdentityFromPassword(String userId, String password)Retrieve the identity stored on the SSKS server for the given userId, and decrypt it with the given password. final ByteArrayretrieveIdentityFromPasswordAsync(String userId, String password)Retrieve the identity stored on the SSKS server for the given userId, and decrypt it with the given password. final ByteArrayretrieveIdentityFromRawKeys(String userId, String rawStorageKey, ByteArray rawEncryptionKey)Retrieve the identity stored on the SSKS server for the given userId, and decrypt it with the given raw keys. final ByteArrayretrieveIdentityFromRawKeysAsync(String userId, String rawStorageKey, ByteArray rawEncryptionKey)Retrieve the identity stored on the SSKS server for the given userId, and decrypt it with the given raw keys. final UnitchangeIdentityPassword(String userId, String currentPassword, String newPassword)Change the password use to encrypt the identity for the userId. final UnitchangeIdentityPasswordAsync(String userId, String currentPassword, String newPassword)Change the password use to encrypt the identity for the userId. -
-
Method Detail
-
saveIdentityFromPassword
final Unit saveIdentityFromPassword(String userId, String password, ByteArray identity)
Save the given identity for the given userId, encrypted with the given password.
- Parameters:
userId- The ID of the userId.password- The password to encrypt the key.identity- The identity to save.
-
saveIdentityFromPasswordAsync
final Unit saveIdentityFromPasswordAsync(String userId, String password, ByteArray identity)
Save the given identity for the given userId, encrypted with the given password.
- Parameters:
userId- The ID of the userId.password- The password to encrypt the key.identity- The identity to save.
-
saveIdentityFromRawKeys
final Unit saveIdentityFromRawKeys(String userId, String rawStorageKey, ByteArray rawEncryptionKey, ByteArray identity)
Save the given identity for the given userId, encrypted with the given raw keys.
- Parameters:
userId- The ID of the userId.rawStorageKey- The key under which identity keys are stored.rawEncryptionKey- The raw encryption key used to encrypt / decrypt the stored identity keys.identity- The identity to save.
-
saveIdentityFromRawKeysAsync
final Unit saveIdentityFromRawKeysAsync(String userId, String rawStorageKey, ByteArray rawEncryptionKey, ByteArray identity)
Save the given identity for the given userId, encrypted with the given raw keys.
- Parameters:
userId- The ID of the userId.rawStorageKey- The key under which identity keys are stored.rawEncryptionKey- The raw encryption key used to encrypt / decrypt the stored identity keys.identity- The identity to save.
-
retrieveIdentityFromPassword
final ByteArray retrieveIdentityFromPassword(String userId, String password)
Retrieve the identity stored on the SSKS server for the given userId, and decrypt it with the given password.
If you use an incorrect password multiple times, the server may throttle your requests. In this case, you will receive an error
Request throttled, retry after {N}s, with{N}the number of seconds during which you cannot try again.- Parameters:
userId- The ID of the userId.password- The password to decrypt the key.
-
retrieveIdentityFromPasswordAsync
final ByteArray retrieveIdentityFromPasswordAsync(String userId, String password)
Retrieve the identity stored on the SSKS server for the given userId, and decrypt it with the given password.
If you use an incorrect password multiple times, the server may throttle your requests. In this case, you will receive an error
Request throttled, retry after {N}s, with{N}the number of seconds during which you cannot try again.- Parameters:
userId- The ID of the userId.password- The password to decrypt the key.
-
retrieveIdentityFromRawKeys
final ByteArray retrieveIdentityFromRawKeys(String userId, String rawStorageKey, ByteArray rawEncryptionKey)
Retrieve the identity stored on the SSKS server for the given userId, and decrypt it with the given raw keys.
If you use an incorrect password multiple times, the server may throttle your requests. In this case, you will receive an error
Request throttled, retry after {N}s, with{N}the number of seconds during which you cannot try again.- Parameters:
userId- The ID of the userId.rawStorageKey- The key under which identity keys are stored.rawEncryptionKey- The raw encryption key used to encrypt / decrypt the stored identity keys.
-
retrieveIdentityFromRawKeysAsync
final ByteArray retrieveIdentityFromRawKeysAsync(String userId, String rawStorageKey, ByteArray rawEncryptionKey)
Retrieve the identity stored on the SSKS server for the given userId, and decrypt it with the given raw keys.
If you use an incorrect password multiple times, the server may throttle your requests. In this case, you will receive an error
Request throttled, retry after {N}s, with{N}the number of seconds during which you cannot try again.- Parameters:
userId- The ID of the userId.rawStorageKey- The key under which identity keys are stored.rawEncryptionKey- The raw encryption key used to encrypt / decrypt the stored identity keys.
-
changeIdentityPassword
final Unit changeIdentityPassword(String userId, String currentPassword, String newPassword)
Change the password use to encrypt the identity for the userId.
- Parameters:
userId- The ID of the userId.currentPassword- The user's current password.newPassword- The new password.
-
changeIdentityPasswordAsync
final Unit changeIdentityPasswordAsync(String userId, String currentPassword, String newPassword)
Change the password use to encrypt the identity for the userId.
- Parameters:
userId- The ID of the userId.currentPassword- The user's current password.newPassword- The new password.
-
-
-
-