< prev index next >

src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/wrapper/PKCS11.java

Print this page




1274      * @param pEncryptedPart the encrypted data part to decrypt and to verify
1275      *         and the data part's length
1276      *         (PKCS#11 param: CK_BYTE_PTR pEncryptedPart,
1277      *                         CK_ULONG ulEncryptedPartLen)
1278      * @return the decrypted and verified data part and the data part's length
1279      *         (PKCS#11 param: CK_BYTE_PTR pPart, CK_ULONG_PTR pulPartLen)
1280      * @exception PKCS11Exception If function returns other value than CKR_OK.
1281      * @preconditions (pEncryptedPart <> null)
1282      * @postconditions
1283      */
1284 //    public native byte[] C_DecryptVerifyUpdate(long hSession,
1285 //            byte[] pEncryptedPart) throws PKCS11Exception;
1286 
1287 
1288 
1289 /* *****************************************************************************
1290  * Key management
1291  ******************************************************************************/
1292 
1293     /**
































1294      * C_GenerateKey generates a secret key, creating a new key
1295      * object.
1296      * (Key management)
1297      *
1298      * @param hSession the session's handle
1299      *         (PKCS#11 param: CK_SESSION_HANDLE hSession)
1300      * @param pMechanism the key generation mechanism
1301      *         (PKCS#11 param: CK_MECHANISM_PTR pMechanism)
1302      * @param pTemplate the template for the new key and the number of
1303      *         attributes in the template
1304      *         (PKCS#11 param: CK_ATTRIBUTE_PTR pTemplate, CK_ULONG ulCount)
1305      * @return the handle of the new key
1306      *         (PKCS#11 param: CK_OBJECT_HANDLE_PTR phKey)
1307      * @exception PKCS11Exception If function returns other value than CKR_OK.
1308      * @preconditions
1309      * @postconditions
1310      */
1311     public native long C_GenerateKey(long hSession, CK_MECHANISM pMechanism,
1312             CK_ATTRIBUTE[] pTemplate) throws PKCS11Exception;
1313 




1274      * @param pEncryptedPart the encrypted data part to decrypt and to verify
1275      *         and the data part's length
1276      *         (PKCS#11 param: CK_BYTE_PTR pEncryptedPart,
1277      *                         CK_ULONG ulEncryptedPartLen)
1278      * @return the decrypted and verified data part and the data part's length
1279      *         (PKCS#11 param: CK_BYTE_PTR pPart, CK_ULONG_PTR pulPartLen)
1280      * @exception PKCS11Exception If function returns other value than CKR_OK.
1281      * @preconditions (pEncryptedPart <> null)
1282      * @postconditions
1283      */
1284 //    public native byte[] C_DecryptVerifyUpdate(long hSession,
1285 //            byte[] pEncryptedPart) throws PKCS11Exception;
1286 
1287 
1288 
1289 /* *****************************************************************************
1290  * Key management
1291  ******************************************************************************/
1292 
1293     /**
1294      * getNativeKeyInfo gets the key object attributes and values as an opaque
1295      * byte array to be used in createNativeKey method.
1296      * (Key management)
1297      *
1298      * @param hSession the session's handle
1299      * @param hKey key's handle
1300      * @param hWrappingKey wrapping key's handle to extract sensible keys. -1 if not used.
1301      * @return an opaque byte array containing the key object attributes and values
1302      * @exception PKCS11Exception If an internal PKCS#11 function returns other
1303      *            value than CKR_OK.
1304      * @preconditions
1305      * @postconditions
1306      */
1307     public native byte[] getNativeKeyInfo(long hSession, long hKey, long hWrappingKey) throws PKCS11Exception;
1308 
1309     /**
1310      * createNativeKey creates a key object with attributes and values specified
1311      * by parameter as an opaque byte array.
1312      * (Key management)
1313      *
1314      * @param hSession the session's handle
1315      * @param keyInfo opaque byte array containing key object attributes and values
1316      * @param hWrappingKey wrapping key's handle for extracted sensible keys. -1 if not used.
1317      * @return key object handle
1318      * @exception PKCS11Exception If an internal PKCS#11 function returns other
1319      *            value than CKR_OK.
1320      * @preconditions
1321      * @postconditions
1322      */
1323     public native long createNativeKey(long hSession, byte[] keyInfo, long hWrappingKey) throws PKCS11Exception;
1324 
1325     /**
1326      * C_GenerateKey generates a secret key, creating a new key
1327      * object.
1328      * (Key management)
1329      *
1330      * @param hSession the session's handle
1331      *         (PKCS#11 param: CK_SESSION_HANDLE hSession)
1332      * @param pMechanism the key generation mechanism
1333      *         (PKCS#11 param: CK_MECHANISM_PTR pMechanism)
1334      * @param pTemplate the template for the new key and the number of
1335      *         attributes in the template
1336      *         (PKCS#11 param: CK_ATTRIBUTE_PTR pTemplate, CK_ULONG ulCount)
1337      * @return the handle of the new key
1338      *         (PKCS#11 param: CK_OBJECT_HANDLE_PTR phKey)
1339      * @exception PKCS11Exception If function returns other value than CKR_OK.
1340      * @preconditions
1341      * @postconditions
1342      */
1343     public native long C_GenerateKey(long hSession, CK_MECHANISM pMechanism,
1344             CK_ATTRIBUTE[] pTemplate) throws PKCS11Exception;
1345 


< prev index next >