@ThreadSafe public class HashBasedPairwiseSubjectCodec extends PairwiseSubjectCodec
Algorithm:
sub = SHA-256 ( sector_id || local_sub || salt )
Related specifications:
| Modifier and Type | Field | Description |
|---|---|---|
static String |
HASH_ALGORITHM |
The hashing algorithm.
|
CHARSET| Constructor | Description |
|---|---|
HashBasedPairwiseSubjectCodec(byte[] salt) |
Creates a new hash-based codec for pairwise subject identifiers.
|
HashBasedPairwiseSubjectCodec(com.nimbusds.jose.util.Base64URL salt) |
Creates a new hash-based codec for pairwise subject identifiers.
|
| Modifier and Type | Method | Description |
|---|---|---|
Subject |
encode(SectorID sectorID,
Subject localSub) |
Encodes a new pairwise subject identifier from the specified sector
identifier and local subject.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdecode, encode, getProvider, getSalt, setProviderpublic 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)
PairwiseSubjectCodecencode in class PairwiseSubjectCodecsectorID - The sector identifier. Must not be
null.localSub - The local subject identifier. Must not be
null.Copyright © 2018 Connect2id Ltd.. All rights reserved.