16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package com.oracle.security.ucrypto;
27
28 import java.util.*;
29 import java.security.ProviderException;
30
31 /**
32 * The exception class used by SunUcrypto provider. An exception
33 * object of this class indicates that a function call to the underlying
34 * native calls returned a value not equal to CRYPTO_SUCCESS.
35 *
36 * @since 1.9
37 */
38 public final class UcryptoException extends ProviderException {
39
40 private static final long serialVersionUID = -933864511110035746L;
41
42 // NOTE: check /usr/include/sys/crypto/common.h for updates
43 private static final String[] ERROR_MSG = {
44 "CRYPTO_SUCCESS",
45 "CRYPTO_CANCEL",
46 "CRYPTO_HOST_MEMORY",
47 "CRYPTO_GENERAL_ERROR",
48 "CRYPTO_FAILED",
49 "CRYPTO_ARGUMENTS_BAD",
50 "CRYPTO_ATTRIBUTE_READ_ONLY",
51 "CRYPTO_ATTRIBUTE_SENSITIVE",
52 "CRYPTO_ATTRIBUTE_TYPE_INVALID",
53 "CRYPTO_ATTRIBUTE_VALUE_INVALID",
54 "CRYPTO_CANCELED",
55 "CRYPTO_DATA_INVALID",
56 "CRYPTO_DATA_LEN_RANGE",
|
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package com.oracle.security.ucrypto;
27
28 import java.util.*;
29 import java.security.ProviderException;
30
31 /**
32 * The exception class used by SunUcrypto provider. An exception
33 * object of this class indicates that a function call to the underlying
34 * native calls returned a value not equal to CRYPTO_SUCCESS.
35 *
36 * @since 9
37 */
38 public final class UcryptoException extends ProviderException {
39
40 private static final long serialVersionUID = -933864511110035746L;
41
42 // NOTE: check /usr/include/sys/crypto/common.h for updates
43 private static final String[] ERROR_MSG = {
44 "CRYPTO_SUCCESS",
45 "CRYPTO_CANCEL",
46 "CRYPTO_HOST_MEMORY",
47 "CRYPTO_GENERAL_ERROR",
48 "CRYPTO_FAILED",
49 "CRYPTO_ARGUMENTS_BAD",
50 "CRYPTO_ATTRIBUTE_READ_ONLY",
51 "CRYPTO_ATTRIBUTE_SENSITIVE",
52 "CRYPTO_ATTRIBUTE_TYPE_INVALID",
53 "CRYPTO_ATTRIBUTE_VALUE_INVALID",
54 "CRYPTO_CANCELED",
55 "CRYPTO_DATA_INVALID",
56 "CRYPTO_DATA_LEN_RANGE",
|