@ThreadSafe public class SIVAESBasedPairwiseSubjectCodec extends PairwiseSubjectCodec
The plain text is formatted as follows ('|' as delimiter):
sector_id|local_sub
Related specifications:
CHARSET| Constructor and Description |
|---|
SIVAESBasedPairwiseSubjectCodec(SecretKey secretKey)
Creates a new SIV 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 |
getSecretKey()
Returns the secret key.
|
encode, getProvider, getSalt, setProviderpublic SIVAESBasedPairwiseSubjectCodec(SecretKey secretKey)
secretKey - A 256, 384, or 512-bit secret key. Must not be
null.public SecretKey getSecretKey()
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.