Class SharedSecret
- java.lang.Object
-
- jadex.platform.service.security.auth.AbstractAuthenticationSecret
-
- jadex.platform.service.security.auth.SharedSecret
-
- All Implemented Interfaces:
java.lang.Cloneable
- Direct Known Subclasses:
KeySecret,PasswordSecret
public abstract class SharedSecret extends AbstractAuthenticationSecret
Authentication based on a shared secret.
-
-
Field Summary
-
Fields inherited from class jadex.platform.service.security.auth.AbstractAuthenticationSecret
SECRET_TYPES
-
-
Constructor Summary
Constructors Constructor Description SharedSecret()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleancanSign()Tests if the secret can be used for signing or, alternatively, verification only.abstract byte[]deriveKey(int keysize, byte[] salt)Derives a key from the shared secret using a salt.-
Methods inherited from class jadex.platform.service.security.auth.AbstractAuthenticationSecret
clone, equals, fromKeyPair, fromString, fromString, hashCode, main
-
-
-
-
Method Detail
-
canSign
public boolean canSign()
Tests if the secret can be used for signing or, alternatively, verification only.- Specified by:
canSignin 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.
-
-