Package net.handle.api
Class HSAdapterFactory
java.lang.Object
net.handle.api.HSAdapterFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic HSAdapter
static HSAdapter
newInstance
(String adminHandle, int keyIndex, byte[] secretKey) static HSAdapter
newInstance
(String adminHandle, int keyIndex, byte[] privateKey, byte[] cipher)
-
Constructor Details
-
HSAdapterFactory
public HSAdapterFactory()
-
-
Method Details
-
newInstance
- Returns:
- HSAdapter with no administrative priveleges.
-
newInstance
public static HSAdapter newInstance(String adminHandle, int keyIndex, byte[] privateKey, byte[] cipher) throws HandleException - Parameters:
adminHandle
- The administrative Handle of the user.keyIndex
- The index at which the public key is present in the administrative Handle.privateKey
- The byte array of the private key that matches the public key.cipher
- The byte array of the cipher used to encrypt the keys. Use null for unencrypted keys.- Returns:
- HSAdapter with administrative priveleges based on the private key provided.
- Throws:
HandleException
- Thrown when the authentication information is invalid.
-
newInstance
public static HSAdapter newInstance(String adminHandle, int keyIndex, byte[] secretKey) throws HandleException - Parameters:
adminHandle
- The administrative Handle of the user.keyIndex
- The index at which the public key is present in the administrative Handle.secretKey
- The byte array of the secret key.- Returns:
- HSAdapter with administrative priveleges based on the secret key provided.
- Throws:
HandleException
- Thrown when the authentication information is invalid.
-