@ThreadSafe public class AESBasedPairwiseSubjectCodec extends PairwiseSubjectCodec
The plain text is formatted as follows ('\' as delimiter):
sector_id|local_sub
Related specifications:
CHARSET| Constructor and Description |
|---|
AESBasedPairwiseSubjectCodec(SecretKey aesKey,
byte[] salt)
Creates a new AES-based codec for pairwise subject identifiers.
|
| Modifier and Type | Method and Description |
|---|---|
org.apache.commons.lang3.tuple.Pair<SectorID,Subject> |
decode(Subject pairwiseSubject)
Decodes the specified pairwise subject identifier to produce the
matching sector identifier and local subject.
|
Subject |
encode(SectorID sectorID,
Subject localSub)
Encodes a new pairwise subject identifier from the specified sector
identifier and local subject.
|
SecretKey |
getAESKey()
Returns the AES key.
|
encode, getProvider, getSalt, setProviderpublic AESBasedPairwiseSubjectCodec(SecretKey aesKey, byte[] salt)
aesKey - The AES key. Must not be null.salt - The salt. Must not be null.public Subject encode(SectorID sectorID, Subject localSub)
PairwiseSubjectCodecencode in class PairwiseSubjectCodecsectorID - The sector identifier. Must not be
null.localSub - The local subject identifier. Must not be
null.public org.apache.commons.lang3.tuple.Pair<SectorID,Subject> decode(Subject pairwiseSubject) throws InvalidPairwiseSubjectException
PairwiseSubjectCodecUnsupportedOperationException. Codecs that support pairwise
subject identifier reversal should override this method.decode in class PairwiseSubjectCodecpairwiseSubject - The pairwise subject identifier. Must be
valid and not null.InvalidPairwiseSubjectException - If the pairwise subject is
invalid.Copyright © 2016 Connect2id Ltd.. All rights reserved.