com.ibm.crypto.pkcs11impl.provider

Class Session

  • java.lang.Object
    • com.ibm.crypto.pkcs11impl.provider.Session


  • public class Session
    extends java.lang.Object
    Wrapper class of PKCS11Session
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void close() 
      com.ibm.pkcs11.PKCS11Object copy(com.ibm.pkcs11.PKCS11Object origObj, int[] attrTypes, java.lang.Object[] attrValues) 
      com.ibm.pkcs11.PKCS11Object createObject(int[] attrTypes, java.lang.Object[] attrValues) 
      int decrypt(byte[] indata, int inoffset, int inlen, byte[] outdata, int outoffset) 
      int decryptDoFinalGCM(int mech, java.lang.Object param, com.ibm.pkcs11.PKCS11Object key, byte[] indata, int inoffset, int inlen, byte[] outdata, int outoffset) 
      int decryptFinal(byte[] outdata, int outoffset) 
      void decryptInit(int mech, java.lang.Object param, com.ibm.pkcs11.PKCS11Object key) 
      int decryptUpdate(byte[] indata, int inoffset, int inlen, byte[] outdata, int outoffset) 
      com.ibm.pkcs11.PKCS11Object deriveKey(int mech, java.lang.Object param, com.ibm.pkcs11.PKCS11Object baseKey, int[] attrTypes, java.lang.Object[] attrValues) 
      void destroyObject(com.ibm.pkcs11.PKCS11Object obj) 
      int digestFinal(byte[] outdata, int outoffset) 
      void digestInit(int mech, java.lang.Object param) 
      void digestUpdate(byte[] indata, int inoffset, int inlen) 
      int encrypt(byte[] indata, int inoffset, int inlen, byte[] outdata, int outoffset) 
      int encryptDoFinalGCM(int mech, java.lang.Object param, com.ibm.pkcs11.PKCS11Object key, byte[] indata, int inoffset, int inlen, byte[] outdata, int outoffset) 
      int encryptFinal(byte[] outdata, int outoffset) 
      void encryptInit(int mech, java.lang.Object param, com.ibm.pkcs11.PKCS11Object key) 
      int encryptUpdate(byte[] indata, int inoffset, int inlen, byte[] outdata, int outoffset) 
      com.ibm.pkcs11.PKCS11Object findObject() 
      void findObjectsFinal() 
      void findObjectsInit(int[] attrTypes, java.lang.Object[] attrValues) 
      com.ibm.pkcs11.PKCS11Object generateKey(int mech, java.lang.Object param, int[] attrTypes, java.lang.Object[] attrValues) 
      com.ibm.pkcs11.PKCS11Object[] generateKeyPair(int mech, java.lang.Object param, int[] pubTypes, java.lang.Object[] pubValues, int[] privTypes, java.lang.Object[] privValues) 
      void generateRandom(byte[] outdata, int outoffset, int len) 
      java.lang.Object getAttrValue(com.ibm.pkcs11.PKCS11Object obj, int attr) 
      java.lang.Object[] getAttrValues(com.ibm.pkcs11.PKCS11Object obj, int[] attrs) 
      java.math.BigInteger getBigIntegerAttributeValue(com.ibm.pkcs11.PKCS11Object obj, int type) 
      boolean getBoolAttributeValue(com.ibm.pkcs11.PKCS11Object obj, int attribute) 
      java.lang.Object getID() 
      SessionManager getSessionManager() 
      void login(boolean isSo, java.lang.Object PIN) 
      void logout() 
      void seedRandom(byte[] data, int offset, int len) 
      int sign(byte[] indata, int inoffset, int inlen, byte[] outdata, int outoffset) 
      int signFinal(byte[] outdata, int outoffset) 
      void signInit(int mech, java.lang.Object param, com.ibm.pkcs11.PKCS11Object key) 
      void signUpdate(byte[] indata, int inoffset, int inlen) 
      com.ibm.pkcs11.PKCS11Object unwrapKey(int mech, java.lang.Object param, com.ibm.pkcs11.PKCS11Object unwrappingKey, byte[] inkeydata, int inkeyoffset, int inkeylen, int[] attrTypes, java.lang.Object[] attrValues) 
      boolean verify(byte[] data, int dataoffset, int datalen, byte[] sig, int sigoffset, int siglen) 
      boolean verifyFinal(byte[] sig, int sigoffset, int siglen) 
      void verifyInit(int mech, java.lang.Object param, com.ibm.pkcs11.PKCS11Object key) 
      void verifyUpdate(byte[] indata, int inoffset, int inlen) 
      int wrapKey(int mech, java.lang.Object param, com.ibm.pkcs11.PKCS11Object wrappingKey, com.ibm.pkcs11.PKCS11Object key, byte[] outdata, int outoffset) 
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • login

        public void login(boolean isSo,
                          java.lang.Object PIN)
                   throws com.ibm.pkcs11.PKCS11Exception
        Throws:
        com.ibm.pkcs11.PKCS11Exception
      • logout

        public void logout()
                    throws com.ibm.pkcs11.PKCS11Exception
        Throws:
        com.ibm.pkcs11.PKCS11Exception
      • createObject

        public com.ibm.pkcs11.PKCS11Object createObject(int[] attrTypes,
                                                        java.lang.Object[] attrValues)
                                                 throws com.ibm.pkcs11.PKCS11Exception
        Throws:
        com.ibm.pkcs11.PKCS11Exception
      • destroyObject

        public void destroyObject(com.ibm.pkcs11.PKCS11Object obj)
                           throws com.ibm.pkcs11.PKCS11Exception
        Throws:
        com.ibm.pkcs11.PKCS11Exception
      • getBoolAttributeValue

        public boolean getBoolAttributeValue(com.ibm.pkcs11.PKCS11Object obj,
                                             int attribute)
      • getAttrValue

        public java.lang.Object getAttrValue(com.ibm.pkcs11.PKCS11Object obj,
                                             int attr)
      • getAttrValues

        public java.lang.Object[] getAttrValues(com.ibm.pkcs11.PKCS11Object obj,
                                                int[] attrs)
      • seedRandom

        public void seedRandom(byte[] data,
                               int offset,
                               int len)
                        throws com.ibm.pkcs11.PKCS11Exception
        Throws:
        com.ibm.pkcs11.PKCS11Exception
      • generateRandom

        public void generateRandom(byte[] outdata,
                                   int outoffset,
                                   int len)
                            throws com.ibm.pkcs11.PKCS11Exception
        Throws:
        com.ibm.pkcs11.PKCS11Exception
      • generateKeyPair

        public com.ibm.pkcs11.PKCS11Object[] generateKeyPair(int mech,
                                                             java.lang.Object param,
                                                             int[] pubTypes,
                                                             java.lang.Object[] pubValues,
                                                             int[] privTypes,
                                                             java.lang.Object[] privValues)
                                                      throws com.ibm.pkcs11.PKCS11Exception
        Throws:
        com.ibm.pkcs11.PKCS11Exception
      • generateKey

        public com.ibm.pkcs11.PKCS11Object generateKey(int mech,
                                                       java.lang.Object param,
                                                       int[] attrTypes,
                                                       java.lang.Object[] attrValues)
                                                throws com.ibm.pkcs11.PKCS11Exception
        Throws:
        com.ibm.pkcs11.PKCS11Exception
      • getBigIntegerAttributeValue

        public java.math.BigInteger getBigIntegerAttributeValue(com.ibm.pkcs11.PKCS11Object obj,
                                                                int type)
                                                         throws com.ibm.pkcs11.PKCS11Exception
        Throws:
        com.ibm.pkcs11.PKCS11Exception
      • sign

        public int sign(byte[] indata,
                        int inoffset,
                        int inlen,
                        byte[] outdata,
                        int outoffset)
                 throws com.ibm.pkcs11.PKCS11Exception
        Throws:
        com.ibm.pkcs11.PKCS11Exception
      • signInit

        public void signInit(int mech,
                             java.lang.Object param,
                             com.ibm.pkcs11.PKCS11Object key)
                      throws com.ibm.pkcs11.PKCS11Exception
        Throws:
        com.ibm.pkcs11.PKCS11Exception
      • signUpdate

        public void signUpdate(byte[] indata,
                               int inoffset,
                               int inlen)
                        throws com.ibm.pkcs11.PKCS11Exception
        Throws:
        com.ibm.pkcs11.PKCS11Exception
      • signFinal

        public int signFinal(byte[] outdata,
                             int outoffset)
                      throws com.ibm.pkcs11.PKCS11Exception
        Throws:
        com.ibm.pkcs11.PKCS11Exception
      • copy

        public com.ibm.pkcs11.PKCS11Object copy(com.ibm.pkcs11.PKCS11Object origObj,
                                                int[] attrTypes,
                                                java.lang.Object[] attrValues)
                                         throws com.ibm.pkcs11.PKCS11Exception
        Throws:
        com.ibm.pkcs11.PKCS11Exception
      • findObjectsInit

        public void findObjectsInit(int[] attrTypes,
                                    java.lang.Object[] attrValues)
                             throws com.ibm.pkcs11.PKCS11Exception
        Throws:
        com.ibm.pkcs11.PKCS11Exception
      • findObjectsFinal

        public void findObjectsFinal()
                              throws com.ibm.pkcs11.PKCS11Exception
        Throws:
        com.ibm.pkcs11.PKCS11Exception
      • findObject

        public com.ibm.pkcs11.PKCS11Object findObject()
                                               throws com.ibm.pkcs11.PKCS11Exception
        Throws:
        com.ibm.pkcs11.PKCS11Exception
      • close

        public void close()
                   throws com.ibm.pkcs11.PKCS11Exception
        Throws:
        com.ibm.pkcs11.PKCS11Exception
      • verifyFinal

        public boolean verifyFinal(byte[] sig,
                                   int sigoffset,
                                   int siglen)
                            throws com.ibm.pkcs11.PKCS11Exception
        Throws:
        com.ibm.pkcs11.PKCS11Exception
      • verifyUpdate

        public void verifyUpdate(byte[] indata,
                                 int inoffset,
                                 int inlen)
                          throws com.ibm.pkcs11.PKCS11Exception
        Throws:
        com.ibm.pkcs11.PKCS11Exception
      • verify

        public boolean verify(byte[] data,
                              int dataoffset,
                              int datalen,
                              byte[] sig,
                              int sigoffset,
                              int siglen)
                       throws com.ibm.pkcs11.PKCS11Exception
        Throws:
        com.ibm.pkcs11.PKCS11Exception
      • verifyInit

        public void verifyInit(int mech,
                               java.lang.Object param,
                               com.ibm.pkcs11.PKCS11Object key)
                        throws com.ibm.pkcs11.PKCS11Exception
        Throws:
        com.ibm.pkcs11.PKCS11Exception
      • digestInit

        public void digestInit(int mech,
                               java.lang.Object param)
                        throws com.ibm.pkcs11.PKCS11Exception
        Throws:
        com.ibm.pkcs11.PKCS11Exception
      • digestUpdate

        public void digestUpdate(byte[] indata,
                                 int inoffset,
                                 int inlen)
                          throws com.ibm.pkcs11.PKCS11Exception
        Throws:
        com.ibm.pkcs11.PKCS11Exception
      • digestFinal

        public int digestFinal(byte[] outdata,
                               int outoffset)
                        throws com.ibm.pkcs11.PKCS11Exception
        Throws:
        com.ibm.pkcs11.PKCS11Exception
      • deriveKey

        public com.ibm.pkcs11.PKCS11Object deriveKey(int mech,
                                                     java.lang.Object param,
                                                     com.ibm.pkcs11.PKCS11Object baseKey,
                                                     int[] attrTypes,
                                                     java.lang.Object[] attrValues)
                                              throws com.ibm.pkcs11.PKCS11Exception
        Throws:
        com.ibm.pkcs11.PKCS11Exception
      • decryptInit

        public void decryptInit(int mech,
                                java.lang.Object param,
                                com.ibm.pkcs11.PKCS11Object key)
                         throws com.ibm.pkcs11.PKCS11Exception
        Throws:
        com.ibm.pkcs11.PKCS11Exception
      • decryptUpdate

        public int decryptUpdate(byte[] indata,
                                 int inoffset,
                                 int inlen,
                                 byte[] outdata,
                                 int outoffset)
                          throws com.ibm.pkcs11.PKCS11Exception
        Throws:
        com.ibm.pkcs11.PKCS11Exception
      • decryptFinal

        public int decryptFinal(byte[] outdata,
                                int outoffset)
                         throws com.ibm.pkcs11.PKCS11Exception
        Throws:
        com.ibm.pkcs11.PKCS11Exception
      • decrypt

        public int decrypt(byte[] indata,
                           int inoffset,
                           int inlen,
                           byte[] outdata,
                           int outoffset)
                    throws com.ibm.pkcs11.PKCS11Exception
        Throws:
        com.ibm.pkcs11.PKCS11Exception
      • decryptDoFinalGCM

        public int decryptDoFinalGCM(int mech,
                                     java.lang.Object param,
                                     com.ibm.pkcs11.PKCS11Object key,
                                     byte[] indata,
                                     int inoffset,
                                     int inlen,
                                     byte[] outdata,
                                     int outoffset)
                              throws com.ibm.pkcs11.PKCS11Exception
        Throws:
        com.ibm.pkcs11.PKCS11Exception
      • encryptInit

        public void encryptInit(int mech,
                                java.lang.Object param,
                                com.ibm.pkcs11.PKCS11Object key)
                         throws com.ibm.pkcs11.PKCS11Exception
        Throws:
        com.ibm.pkcs11.PKCS11Exception
      • encryptUpdate

        public int encryptUpdate(byte[] indata,
                                 int inoffset,
                                 int inlen,
                                 byte[] outdata,
                                 int outoffset)
                          throws com.ibm.pkcs11.PKCS11Exception
        Throws:
        com.ibm.pkcs11.PKCS11Exception
      • encryptFinal

        public int encryptFinal(byte[] outdata,
                                int outoffset)
                         throws com.ibm.pkcs11.PKCS11Exception
        Throws:
        com.ibm.pkcs11.PKCS11Exception
      • encrypt

        public int encrypt(byte[] indata,
                           int inoffset,
                           int inlen,
                           byte[] outdata,
                           int outoffset)
                    throws com.ibm.pkcs11.PKCS11Exception
        Throws:
        com.ibm.pkcs11.PKCS11Exception
      • encryptDoFinalGCM

        public int encryptDoFinalGCM(int mech,
                                     java.lang.Object param,
                                     com.ibm.pkcs11.PKCS11Object key,
                                     byte[] indata,
                                     int inoffset,
                                     int inlen,
                                     byte[] outdata,
                                     int outoffset)
                              throws com.ibm.pkcs11.PKCS11Exception
        Throws:
        com.ibm.pkcs11.PKCS11Exception
      • unwrapKey

        public com.ibm.pkcs11.PKCS11Object unwrapKey(int mech,
                                                     java.lang.Object param,
                                                     com.ibm.pkcs11.PKCS11Object unwrappingKey,
                                                     byte[] inkeydata,
                                                     int inkeyoffset,
                                                     int inkeylen,
                                                     int[] attrTypes,
                                                     java.lang.Object[] attrValues)
                                              throws com.ibm.pkcs11.PKCS11Exception
        Throws:
        com.ibm.pkcs11.PKCS11Exception
      • wrapKey

        public int wrapKey(int mech,
                           java.lang.Object param,
                           com.ibm.pkcs11.PKCS11Object wrappingKey,
                           com.ibm.pkcs11.PKCS11Object key,
                           byte[] outdata,
                           int outoffset)
                    throws com.ibm.pkcs11.PKCS11Exception
        Throws:
        com.ibm.pkcs11.PKCS11Exception
      • getID

        public java.lang.Object getID()

© Portions Copyright 2003, 2017 IBM Corporation. All rights reserved.
© Portions Copyright 2003, 2017, Oracle and/or its affiliates. All rights reserved.