Overview | Package | Class | Tree | Deprecated | Index | Help
| JSS 3.1.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mozilla.jss.pkcs11
Class PK11Signature

    java.lang.Object
      |
      +--org.mozilla.jss.crypto.SignatureSpi
            |
            +--org.mozilla.jss.pkcs11.PK11Signature

final class PK11Signature
extends SignatureSpi

Field Summary
`protected Algorithm` | `algorithm`
`protected PK11Key` | `key`
`protected boolean` | `raw`
`protected java.io.ByteArrayOutputStream` | `rawInput`
`protected SigContextProxy` | `sigContext`
`static int` | `SIGN`
`protected int` | `state`
`protected PK11Token` | `token`
`protected TokenProxy` | `tokenProxy`
`static int` | `UNINITIALIZED`
`static int` | `VERIFY`

Constructor Summary
`PK11Signature(PK11Token token, SignatureAlgorithm algorithm)` PK11Signature

Method Summary
`void` | `engineInitSign(PrivateKey privateKey)` engineInitSign
`void` | `engineInitSign(PrivateKey privateKey, java.security.SecureRandom random)` engineInitSign This just here for JCA compliance(?), we don't take randoms this way.
`void` | `engineInitVerify(java.security.PublicKey publicKey)` engineInitVerify
`private static byte[]` | `engineRawSignNative(PK11Token token, PrivateKey key, byte[] hash)` Performs raw signing of the given hash with the given private key.
`protected static boolean` | `engineRawVerifyNative(PK11Token token, java.security.PublicKey key, byte[] hash, byte[] signature)` Performs raw verification of the signature of a hash using the given public key, on the given token.
`void` | `engineSetParameter(java.security.spec.AlgorithmParameterSpec params)` engineSetParameter
`byte[]` | `engineSign()` engineSign
`int` | `engineSign(byte[] outbuf, int offset, int len)` engineSign
`private byte[]` | `engineSignNative()` engineSignNative
`void` | `engineUpdate(byte b)` engineUpdate
`void` | `engineUpdate(byte[] b, int off, int len)` engineUpdate
`protected void` | `engineUpdateNative(byte[] b, int off, int len)` engineUpdateNative
`boolean` | `engineVerify(byte[] sigBytes)` engineVerify
`protected boolean` | `engineVerifyNative(byte[] sigBytes)` engineVerifyNative
`protected void` | `initSigContext()` initSigContext This function creates a signing context, initializes it, and sets the sigContext field.
`protected void` | `initVfyContext()` initVfyContext

Methods inherited from class java.lang.Object
`, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait`

Field Detail

### token

    protected PK11Token token

### tokenProxy

    protected TokenProxy tokenProxy

### algorithm

    protected Algorithm algorithm

### key

    protected PK11Key key

### state

    protected int state

### sigContext

    protected SigContextProxy sigContext

### raw

    protected boolean raw

### rawInput

    protected java.io.ByteArrayOutputStream rawInput

### UNINITIALIZED

    public static final int UNINITIALIZED

### SIGN

    public static final int SIGN

### VERIFY

    public static final int VERIFY

Constructor Detail

### PK11Signature

    public PK11Signature(PK11Token token,
                         SignatureAlgorithm algorithm)
                  throws java.security.NoSuchAlgorithmException,
                         TokenException

  PK11Signature

Method Detail

### engineInitSign

    public void engineInitSign(PrivateKey privateKey)
                        throws java.security.InvalidKeyException,
                               TokenException

  engineInitSign
  Overrides:
    `engineInitSign` in class `SignatureSpi`

### engineInitSign

    public void engineInitSign(PrivateKey privateKey,
                               java.security.SecureRandom random)
                        throws java.security.InvalidKeyException,
                               TokenException

  engineInitSign This just here for JCA compliance(?), we don't take randoms this way.
  Overrides:
    `engineInitSign` in class `SignatureSpi`

### initSigContext

    protected void initSigContext()
                           throws TokenException

  initSigContext This function creates a signing context, initializes it, and sets the sigContext field.

### engineInitVerify

    public void engineInitVerify(java.security.PublicKey publicKey)
                          throws java.security.InvalidKeyException,
                                 TokenException

  engineInitVerify
  Overrides:
    `engineInitVerify` in class `SignatureSpi`

### initVfyContext

    protected void initVfyContext()
                           throws TokenException

  initVfyContext

### engineUpdate

    public void engineUpdate(byte b)
                      throws java.security.SignatureException,
                             TokenException

  engineUpdate
  Overrides:
    `engineUpdate` in class `SignatureSpi`

### engineUpdate

    public void engineUpdate(byte[] b,
                             int off,
                             int len)
                      throws java.security.SignatureException,
                             TokenException

  engineUpdate
  Overrides:
    `engineUpdate` in class `SignatureSpi`

### engineUpdateNative

    protected void engineUpdateNative(byte[] b,
                                      int off,
                                      int len)
                               throws TokenException

  engineUpdateNative

### engineSign

    public byte[] engineSign()
                      throws java.security.SignatureException,
                             TokenException

  engineSign
  Overrides:
    `engineSign` in class `SignatureSpi`

### engineSign

    public int engineSign(byte[] outbuf,
                          int offset,
                          int len)
                   throws java.security.SignatureException,
                          TokenException

  engineSign
  Overrides:
    `engineSign` in class `SignatureSpi`

### engineRawSignNative

    private static byte[] engineRawSignNative(PK11Token token,
                                              PrivateKey key,
                                              byte[] hash)
                                       throws java.security.SignatureException,
                                              TokenException

  Performs raw signing of the given hash with the given private key.

### engineSignNative

    private byte[] engineSignNative()
                             throws java.security.SignatureException,
                                    TokenException

  engineSignNative

### engineVerify

    public boolean engineVerify(byte[] sigBytes)
                         throws java.security.SignatureException,
                                TokenException

  engineVerify
  Overrides:
    `engineVerify` in class `SignatureSpi`

### engineRawVerifyNative

    protected static boolean engineRawVerifyNative(PK11Token token,
                                                   java.security.PublicKey key,
                                                   byte[] hash,
                                                   byte[] signature)
                                            throws java.security.SignatureException,
                                                   TokenException

  Performs raw verification of the signature of a hash using the given public key, on the given token.

### engineVerifyNative

    protected boolean engineVerifyNative(byte[] sigBytes)
                                  throws java.security.SignatureException,
                                         TokenException

  engineVerifyNative

### engineSetParameter

    public void engineSetParameter(java.security.spec.AlgorithmParameterSpec params)
                            throws java.security.InvalidAlgorithmParameterException,
                                   TokenException

  engineSetParameter
  Overrides:
    `engineSetParameter` in class `SignatureSpi`

Overview | Package | Class | Tree | Deprecated | Index | Help
| JSS 3.1.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD