Class SharedSecret
java.lang.Object
jadex.ipc.impl.security.authentication.AbstractAuthenticationSecret
jadex.ipc.impl.security.authentication.SharedSecret
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
KeySecret
,PasswordSecret
Authentication based on a shared secret.
-
Field Summary
Fields inherited from class jadex.ipc.impl.security.authentication.AbstractAuthenticationSecret
SECRET_TYPES
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class jadex.ipc.impl.security.authentication.AbstractAuthenticationSecret
clone, equals, fromKeyPair, fromString, fromString, hashCode, main
-
Constructor Details
-
SharedSecret
public SharedSecret()
-
-
Method Details
-
canSign
public boolean canSign()Tests if the secret can be used for signing or, alternatively, verification only.- Specified by:
canSign
in classAbstractAuthenticationSecret
- Returns:
- True, if the secret can be used for signing.
-
deriveKey
public abstract byte[] deriveKey(int keysize, byte[] salt) Derives a key from the shared secret using a salt.- Parameters:
keysize
- The target key size in bytes to generate.salt
- Salt to use.- Returns:
- Derived key.
-