Package org.cyclos.entities.access
Class NFCToken
- java.lang.Object
-
- org.cyclos.entities.SimpleEntity
-
- org.cyclos.entities.NetworkedEntity
-
- org.cyclos.entities.BaseEntity
-
- org.cyclos.entities.access.Token
-
- org.cyclos.entities.access.NFCToken
-
- All Implemented Interfaces:
Cloneable,HasNetwork,ProcessableForProxying,UserPrincipal,IEntity
@Entity public class NFCToken extends Token
A NFC token additionally contain settings needed to encipher/decipher data.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.cyclos.entities.SimpleEntity
SimpleEntity.EntityLoadNotifier
-
-
Constructor Summary
Constructors Constructor Description NFCToken()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getAppMasterKey()byte[]getAppMasterKeyIv()byte[]getChallenge()DategetChallengeExpiration()StringgetLabel()byte[]getOperationalKey()byte[]getOperationalKeyIv()StringgetPrincipal()Should return a value that can be used to identify the user.NFCTokenPrincipalTypegetType()byte[]resetChallenge()Reset the challenge and the expiration date.voidsetAppMasterKey(byte[] amk)voidsetAppMasterKeyIv(byte[] amkIv)voidsetChallenge(byte[] challenge)voidsetChallengeExpiration(Date challengeExpiration)voidsetLabel(String label)voidsetOperationalKey(byte[] appKey)voidsetOperationalKeyIv(byte[] appKeyIv)voidsetType(TokenPrincipalType type)-
Methods inherited from class org.cyclos.entities.access.Token
getAccessClient, getAccountType, getActivationDate, getActivationDeadline, getBasicUser, getCreationDate, getCustomFieldValue, getExpiryDate, getMaskedValue, getMobilePhone, getNetwork, getPrincipalType, getStatus, getToken, getTrustedDevice, getUser, getValue, isActivateNow, isInUse, setActivateNow, setActivationDate, setActivationDeadline, setCreationDate, setExpiryDate, setStatus, setUser, setValue
-
Methods inherited from class org.cyclos.entities.BaseEntity
getDataTranslationType, getVersion
-
Methods inherited from class org.cyclos.entities.NetworkedEntity
isGlobal
-
Methods inherited from class org.cyclos.entities.SimpleEntity
equals, getId, hashCode, id, ids, isPersistent, isTransient, register, setId, toShortString, toString, uniqueIds, uniqueIds
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.cyclos.entities.ProcessableForProxying
getProxyClass
-
-
-
-
Method Detail
-
getAppMasterKey
public byte[] getAppMasterKey()
-
getAppMasterKeyIv
public byte[] getAppMasterKeyIv()
-
getChallenge
public byte[] getChallenge()
-
getChallengeExpiration
public Date getChallengeExpiration()
-
getLabel
public String getLabel()
-
getOperationalKey
public byte[] getOperationalKey()
-
getOperationalKeyIv
public byte[] getOperationalKeyIv()
-
getPrincipal
public String getPrincipal()
Description copied from interface:UserPrincipalShould return a value that can be used to identify the user. In case the value should be hidden, implementors should return null.- Specified by:
getPrincipalin interfaceUserPrincipal- Overrides:
getPrincipalin classToken
-
getType
public NFCTokenPrincipalType getType()
-
resetChallenge
public byte[] resetChallenge()
Reset the challenge and the expiration date.- Returns:
- the current challenge value
-
setAppMasterKey
public void setAppMasterKey(byte[] amk)
-
setAppMasterKeyIv
public void setAppMasterKeyIv(byte[] amkIv)
-
setChallenge
public void setChallenge(byte[] challenge)
-
setChallengeExpiration
public void setChallengeExpiration(Date challengeExpiration)
-
setLabel
public void setLabel(String label)
-
setOperationalKey
public void setOperationalKey(byte[] appKey)
-
setOperationalKeyIv
public void setOperationalKeyIv(byte[] appKeyIv)
-
setType
public void setType(TokenPrincipalType type)
-
-