Note
the usual value for the salt length is the number of bytes in the hash function.
| Modifier and Type | Field and Description |
|---|---|
| private byte[] | |
| private AsymmetricBlockCipher | |
| private Digest | |
| private int | |
| private int | |
| private byte[] | |
| private Digest | |
| private int | |
| private SecureRandom | |
| private byte[] | |
| private int | |
| private boolean | |
| private int | |
| public static final byte |
| Access | Constructor and Description |
|---|---|
| public | PSSSigner(AsymmetricBlockCipher cipher, Digest contentDigest, Digest mgfDigest, int sLen, int trailer)
|
| public | PSSSigner(AsymmetricBlockCipher cipher, Digest contentDigest, Digest mgfDigest, byte[] salt, int trailer)
|
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public byte[] | generateSignature()
Implements org. |
| public void | init(boolean
true if for signing, false otherwise forSigning, CipherParameters necessary parameters. param)Implements org. |
| private void | |
| private byte[] | maskGeneratorFunction1(byte[] Z, int zOff, int zLen, int length)
mask generator function, as described in PKCS1v2. |
| public void | |
| public void | update(byte b)
Implements org. |
| public void | update(byte[] in, int off, int len)
Implements org. |
| public boolean | verifySignature(byte[] signature)
Implements org. |
| block | back to summary |
|---|---|
| private byte[] block | |
| cipher | back to summary |
|---|---|
| private AsymmetricBlockCipher cipher | |
| contentDigest | back to summary |
|---|---|
| private Digest contentDigest | |
| emBits | back to summary |
|---|---|
| private int emBits | |
| hLen | back to summary |
|---|---|
| private int hLen | |
| mDash | back to summary |
|---|---|
| private byte[] mDash | |
| mgfDigest | back to summary |
|---|---|
| private Digest mgfDigest | |
| mgfhLen | back to summary |
|---|---|
| private int mgfhLen | |
| random | back to summary |
|---|---|
| private SecureRandom random | |
| salt | back to summary |
|---|---|
| private byte[] salt | |
| sLen | back to summary |
|---|---|
| private int sLen | |
| sSet | back to summary |
|---|---|
| private boolean sSet | |
| trailer | back to summary |
|---|---|
| private int trailer | |
| TRAILER_IMPLICIT | back to summary |
|---|---|
| public static final byte TRAILER_IMPLICIT | |
| PSSSigner | back to summary |
|---|---|
| public PSSSigner(AsymmetricBlockCipher cipher, Digest contentDigest, Digest mgfDigest, int sLen, int trailer) | |
| PSSSigner | back to summary |
|---|---|
| public PSSSigner(AsymmetricBlockCipher cipher, Digest contentDigest, Digest mgfDigest, byte[] salt, int trailer) | |
| clearBlock | back to summary |
|---|---|
| private void clearBlock(byte[] block) clear possible sensitive data | |
| generateSignature | back to summary |
|---|---|
| public byte[] generateSignature() throws CryptoException, DataLengthException Implements org. generate a signature for the message we've been loaded with using the key we were initialised with. | |
| init | back to summary |
|---|---|
| public void init(boolean forSigning, CipherParameters param) Implements org. Doc from org. Initialise the signer for signing or verification.
| |
| ItoOSP | back to summary |
|---|---|
| private void ItoOSP(int i, byte[] sp) int to octet string. | |
| maskGeneratorFunction1 | back to summary |
|---|---|
| private byte[] maskGeneratorFunction1(byte[] Z, int zOff, int zLen, int length) mask generator function, as described in PKCS1v2. | |
| reset | back to summary |
|---|---|
| public void reset() Implements org. reset the internal state | |
| update | back to summary |
|---|---|
| public void update(byte b) Implements org. update the internal digest with the byte b | |
| update | back to summary |
|---|---|
| public void update(byte[] in, int off, int len) Implements org. update the internal digest with the byte array in | |
| verifySignature | back to summary |
|---|---|
| public boolean verifySignature(byte[] signature) throws InvalidSignatureException Implements org. return true if the internal state represents the signature described in the passed in array. | |