Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
ec368531
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
ec368531
编写于
5月 30, 2013
作者:
A
ascarpino
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6750584: Cipher.wrap/unwrap methods should define UnsupportedOperationException
Reviewed-by: mullan
上级
6a2bb2ec
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
44 addition
and
1 deletion
+44
-1
src/share/classes/javax/crypto/Cipher.java
src/share/classes/javax/crypto/Cipher.java
+30
-0
src/share/classes/javax/crypto/CipherSpi.java
src/share/classes/javax/crypto/CipherSpi.java
+14
-1
未找到文件。
src/share/classes/javax/crypto/Cipher.java
浏览文件 @
ec368531
...
...
@@ -1158,6 +1158,9 @@ public class Cipher {
* determined from the given key, or if the given key has a keysize that
* exceeds the maximum allowable keysize (as determined from the
* configured jurisdiction policy files).
* @throws UnsupportedOperationException if (@code opmode} is
* {@code WRAP_MODE} or {@code UNWRAP_MODE} but the mode is not implemented
* by the underlying {@code CipherSpi}.
*/
public
final
void
init
(
int
opmode
,
Key
key
)
throws
InvalidKeyException
{
init
(
opmode
,
key
,
JceSecurity
.
RANDOM
);
...
...
@@ -1208,6 +1211,9 @@ public class Cipher {
* determined from the given key, or if the given key has a keysize that
* exceeds the maximum allowable keysize (as determined from the
* configured jurisdiction policy files).
* @throws UnsupportedOperationException if (@code opmode} is
* {@code WRAP_MODE} or {@code UNWRAP_MODE} but the mode is not implemented
* by the underlying {@code CipherSpi}.
*/
public
final
void
init
(
int
opmode
,
Key
key
,
SecureRandom
random
)
throws
InvalidKeyException
...
...
@@ -1285,6 +1291,9 @@ public class Cipher {
* algorithm parameters imply a cryptographic strength that would exceed
* the legal limits (as determined from the configured jurisdiction
* policy files).
* @throws UnsupportedOperationException if (@code opmode} is
* {@code WRAP_MODE} or {@code UNWRAP_MODE} but the mode is not implemented
* by the underlying {@code CipherSpi}.
*/
public
final
void
init
(
int
opmode
,
Key
key
,
AlgorithmParameterSpec
params
)
throws
InvalidKeyException
,
InvalidAlgorithmParameterException
...
...
@@ -1343,6 +1352,9 @@ public class Cipher {
* algorithm parameters imply a cryptographic strength that would exceed
* the legal limits (as determined from the configured jurisdiction
* policy files).
* @throws UnsupportedOperationException if (@code opmode} is
* {@code WRAP_MODE} or {@code UNWRAP_MODE} but the mode is not implemented
* by the underlying {@code CipherSpi}.
*/
public
final
void
init
(
int
opmode
,
Key
key
,
AlgorithmParameterSpec
params
,
SecureRandom
random
)
...
...
@@ -1416,6 +1428,9 @@ public class Cipher {
* algorithm parameters imply a cryptographic strength that would exceed
* the legal limits (as determined from the configured jurisdiction
* policy files).
* @throws UnsupportedOperationException if (@code opmode} is
* {@code WRAP_MODE} or {@code UNWRAP_MODE} but the mode is not implemented
* by the underlying {@code CipherSpi}.
*/
public
final
void
init
(
int
opmode
,
Key
key
,
AlgorithmParameters
params
)
throws
InvalidKeyException
,
InvalidAlgorithmParameterException
...
...
@@ -1474,6 +1489,9 @@ public class Cipher {
* algorithm parameters imply a cryptographic strength that would exceed
* the legal limits (as determined from the configured jurisdiction
* policy files).
* @throws UnsupportedOperationException if (@code opmode} is
* {@code WRAP_MODE} or {@code UNWRAP_MODE} but the mode is not implemented
* by the underlying {@code CipherSpi}.
*/
public
final
void
init
(
int
opmode
,
Key
key
,
AlgorithmParameters
params
,
SecureRandom
random
)
...
...
@@ -1552,6 +1570,9 @@ public class Cipher {
* in the given certificate has a keysize that exceeds the maximum
* allowable keysize (as determined by the configured jurisdiction policy
* files).
* @throws UnsupportedOperationException if (@code opmode} is
* {@code WRAP_MODE} or {@code UNWRAP_MODE} but the mode is not implemented
* by the underlying {@code CipherSpi}.
*/
public
final
void
init
(
int
opmode
,
Certificate
certificate
)
throws
InvalidKeyException
...
...
@@ -1619,6 +1640,9 @@ public class Cipher {
* in the given certificate has a keysize that exceeds the maximum
* allowable keysize (as determined by the configured jurisdiction policy
* files).
* @throws UnsupportedOperationException if (@code opmode} is
* {@code WRAP_MODE} or {@code UNWRAP_MODE} but the mode is not implemented
* by the underlying {@code CipherSpi}.
*/
public
final
void
init
(
int
opmode
,
Certificate
certificate
,
SecureRandom
random
)
...
...
@@ -2410,6 +2434,9 @@ public class Cipher {
* @exception InvalidKeyException if it is impossible or unsafe to
* wrap the key with this cipher (e.g., a hardware protected key is
* being passed to a software-only cipher).
*
* @throws UnsupportedOperationException if the corresponding method in the
* {@code CipherSpi} is not supported.
*/
public
final
byte
[]
wrap
(
Key
key
)
throws
IllegalBlockSizeException
,
InvalidKeyException
{
...
...
@@ -2451,6 +2478,9 @@ public class Cipher {
* @exception InvalidKeyException if <code>wrappedKey</code> does not
* represent a wrapped key of type <code>wrappedKeyType</code> for
* the <code>wrappedKeyAlgorithm</code>.
*
* @throws UnsupportedOperationException if the corresponding method in the
* {@code CipherSpi} is not supported.
*/
public
final
Key
unwrap
(
byte
[]
wrappedKey
,
String
wrappedKeyAlgorithm
,
...
...
src/share/classes/javax/crypto/CipherSpi.java
浏览文件 @
ec368531
/*
* Copyright (c) 1997, 201
2
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 201
3
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -347,6 +347,9 @@ public abstract class CipherSpi {
* initializing this cipher, or requires
* algorithm parameters that cannot be
* determined from the given key.
* @throws UnsupportedOperationException if {@code opmode} is
* {@code WRAP_MODE} or {@code UNWRAP_MODE} is not implemented
* by the cipher.
*/
protected
abstract
void
engineInit
(
int
opmode
,
Key
key
,
SecureRandom
random
)
...
...
@@ -399,6 +402,9 @@ public abstract class CipherSpi {
* parameters are inappropriate for this cipher,
* or if this cipher requires
* algorithm parameters and <code>params</code> is null.
* @throws UnsupportedOperationException if {@code opmode} is
* {@code WRAP_MODE} or {@code UNWRAP_MODE} is not implemented
* by the cipher.
*/
protected
abstract
void
engineInit
(
int
opmode
,
Key
key
,
AlgorithmParameterSpec
params
,
...
...
@@ -452,6 +458,9 @@ public abstract class CipherSpi {
* parameters are inappropriate for this cipher,
* or if this cipher requires
* algorithm parameters and <code>params</code> is null.
* @throws UnsupportedOperationException if {@code opmode} is
* {@code WRAP_MODE} or {@code UNWRAP_MODE} is not implemented
* by the cipher.
*/
protected
abstract
void
engineInit
(
int
opmode
,
Key
key
,
AlgorithmParameters
params
,
...
...
@@ -863,6 +872,8 @@ public abstract class CipherSpi {
* @exception InvalidKeyException if it is impossible or unsafe to
* wrap the key with this cipher (e.g., a hardware protected key is
* being passed to a software-only cipher).
*
* @throws UnsupportedOperationException if this method is not supported.
*/
protected
byte
[]
engineWrap
(
Key
key
)
throws
IllegalBlockSizeException
,
InvalidKeyException
...
...
@@ -899,6 +910,8 @@ public abstract class CipherSpi {
* @exception InvalidKeyException if <code>wrappedKey</code> does not
* represent a wrapped key of type <code>wrappedKeyType</code> for
* the <code>wrappedKeyAlgorithm</code>.
*
* @throws UnsupportedOperationException if this method is not supported.
*/
protected
Key
engineUnwrap
(
byte
[]
wrappedKey
,
String
wrappedKeyAlgorithm
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录