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 Digest | |
| private int | |
| private int | |
| private byte[] | |
| private Digest | |
| private int | |
| private SecureRandom | |
| private byte[] | |
| private int | |
| private boolean | |
| private byte | |
| public static final byte |
| Access | Constructor and Description |
|---|---|
| public | PSSSigner(AsymmetricBlockCipher
the asymmetric cipher to use. cipher, Digest the digest to use. digest, int the length of the salt to use (in bytes). sLen)basic constructor |
| public | |
| public | |
| public | PSSSigner(AsymmetricBlockCipher cipher, Digest contentDigest, Digest mgfDigest, int sLen, byte trailer)
|
| private | PSSSigner(AsymmetricBlockCipher cipher, Digest contentDigest1, Digest contentDigest2, Digest mgfDigest, int sLen, byte trailer)
|
| public | |
| public | |
| public | PSSSigner(AsymmetricBlockCipher cipher, Digest contentDigest, Digest mgfDigest, byte[] salt, byte trailer)
|
| private | PSSSigner(AsymmetricBlockCipher cipher, Digest contentDigest1, Digest contentDigest2, Digest mgfDigest, byte[] salt, byte trailer)
|
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public static PSSSigner | |
| public static PSSSigner | createRawSigner(AsymmetricBlockCipher cipher, Digest contentDigest, Digest mgfDigest, int sLen, byte trailer)
|
| public static PSSSigner | createRawSigner(AsymmetricBlockCipher cipher, Digest contentDigest, Digest mgfDigest, byte[] salt, byte trailer)
|
| public byte[] | generateSignature()
Implements org. generate a signature for the message we've been loaded with using the key we were initialised with. |
| public void | init(boolean
true if for signing, false otherwise forSigning, CipherParameters necessary parameters. param)Implements org. Initialise the signer for signing or verification. |
| private void | |
| private byte[] | |
| 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. update the internal digest with the byte b |
| public void | update(byte[] in, int off, int len)
Implements org. update the internal digest with the byte array in |
| public boolean | verifySignature(byte[] signature)
Implements org. return true if the internal state represents the signature described in the passed in array. |
| block | back to summary |
|---|---|
| private byte[] block | |
| cipher | back to summary |
|---|---|
| private AsymmetricBlockCipher cipher | |
| contentDigest1 | back to summary |
|---|---|
| private Digest contentDigest1 | |
| contentDigest2 | back to summary |
|---|---|
| private Digest contentDigest2 | |
| 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 byte trailer | |
| TRAILER_IMPLICIT | back to summary |
|---|---|
| public static final byte TRAILER_IMPLICIT | |
| PSSSigner | back to summary |
|---|---|
| public PSSSigner(AsymmetricBlockCipher cipher, Digest digest, int sLen) basic constructor
| |
| PSSSigner | back to summary |
|---|---|
| public PSSSigner(AsymmetricBlockCipher cipher, Digest contentDigest, Digest mgfDigest, int sLen) | |
| PSSSigner | back to summary |
|---|---|
| public PSSSigner(AsymmetricBlockCipher cipher, Digest digest, int sLen, byte trailer) | |
| PSSSigner | back to summary |
|---|---|
| public PSSSigner(AsymmetricBlockCipher cipher, Digest contentDigest, Digest mgfDigest, int sLen, byte trailer) | |
| PSSSigner | back to summary |
|---|---|
| private PSSSigner(AsymmetricBlockCipher cipher, Digest contentDigest1, Digest contentDigest2, Digest mgfDigest, int sLen, byte trailer) | |
| PSSSigner | back to summary |
|---|---|
| public PSSSigner(AsymmetricBlockCipher cipher, Digest digest, byte[] salt) | |
| PSSSigner | back to summary |
|---|---|
| public PSSSigner(AsymmetricBlockCipher cipher, Digest contentDigest, Digest mgfDigest, byte[] salt) | |
| PSSSigner | back to summary |
|---|---|
| public PSSSigner(AsymmetricBlockCipher cipher, Digest contentDigest, Digest mgfDigest, byte[] salt, byte trailer) | |
| PSSSigner | back to summary |
|---|---|
| private PSSSigner(AsymmetricBlockCipher cipher, Digest contentDigest1, Digest contentDigest2, Digest mgfDigest, byte[] salt, byte trailer) | |
| clearBlock | back to summary |
|---|---|
| private void clearBlock(byte[] block) clear possible sensitive data | |
| createRawSigner | back to summary |
|---|---|
| public static PSSSigner createRawSigner(AsymmetricBlockCipher cipher, Digest digest) | |
| createRawSigner | back to summary |
|---|---|
| public static PSSSigner createRawSigner(AsymmetricBlockCipher cipher, Digest contentDigest, Digest mgfDigest, int sLen, byte trailer) | |
| createRawSigner | back to summary |
|---|---|
| public static PSSSigner createRawSigner(AsymmetricBlockCipher cipher, Digest contentDigest, Digest mgfDigest, byte[] salt, byte trailer) | |
| 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. | |
| maskGenerator | back to summary |
|---|---|
| private byte[] maskGenerator(byte[] Z, int zOff, int zLen, int length) | |
| 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) Implements org. return true if the internal state represents the signature described in the passed in array. | |