@ThreadSafe public class HashBasedPairwiseSubjectCodec extends PairwiseSubjectCodec
Algorithm:
sub = SHA-256 ( sector_id || local_sub || salt )
Related specifications:
Modifier and Type | Field and Description |
---|---|
static String |
HASH_ALGORITHM
The hashing algorithm.
|
CHARSET
Constructor and Description |
---|
HashBasedPairwiseSubjectCodec(com.nimbusds.jose.util.Base64URL salt)
Creates a new hash-based codec for pairwise subject identifiers.
|
HashBasedPairwiseSubjectCodec(byte[] salt)
Creates a new hash-based codec for pairwise subject identifiers.
|
Modifier and Type | Method and Description |
---|---|
Subject |
encode(SectorID sectorID,
Subject localSub)
Encodes a new pairwise subject identifier from the specified sector
identifier and local subject.
|
decode, encode, getProvider, getSalt, setProvider
public static final String HASH_ALGORITHM
public HashBasedPairwiseSubjectCodec(byte[] salt)
salt
- The salt, must not be null
.public HashBasedPairwiseSubjectCodec(com.nimbusds.jose.util.Base64URL salt)
salt
- The salt, must not be null
.public Subject encode(SectorID sectorID, Subject localSub)
PairwiseSubjectCodec
encode
in class PairwiseSubjectCodec
sectorID
- The sector identifier. Must not be
null
.localSub
- The local subject identifier. Must not be
null
.Copyright © 2016 Connect2id Ltd.. All rights reserved.