|
JavaTM Platform Standard Ed. 6 |
|||||||||
앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요: 상자 | 필드 | 생성자 | 메소드 | 상세: 필드 | 생성자 | 메소드 |
java.lang.Objectjavax.crypto.ExemptionMechanism
public class ExemptionMechanism
이 클래스는, Exemption Mechanism의 기능과 「키 리커버리」, 「키 위크닝」, 및 「키 에스크로」의 예를 제공합니다.
Exemption Mechanism를 사용하는 어플리케이션 또는 애플릿에는, 사용하지 않는 것보다 강력한 암호화 기능을 부여할 수 있습니다.
생성자 의 개요 | |
---|---|
protected |
ExemptionMechanism (ExemptionMechanismSpi exmechSpi,
Provider provider,
String mechanism)
ExemptionMechanism 객체를 생성합니다. |
메소드의 개요 | |
---|---|
protected void |
finalize ()
ExemptionMechanism 객체에의 참조가 존재하지 않게 되었을 때에, 이 객체에 의해 포함된 열쇠가 확실히 지워지도록(듯이) 합니다. |
byte[] |
genExemptionBlob ()
Exemption Mechanism의 열쇠 Blob 를 생성합니다. |
int |
genExemptionBlob (byte[] output)
Exemption Mechanism의 열쇠 Blob 를 생성해, 결과를 output 버퍼에 포함합니다. |
int |
genExemptionBlob (byte[] output,
int outputOffset)
Exemption Mechanism의 열쇠 Blob 를 생성해, 결과를 outputOffset 로부터 시작되는 output 버퍼에 포함합니다. |
static ExemptionMechanism |
getInstance (String algorithm)
지정한 Exemption Mechanism 알고리즘을 구현하는 ExemptionMechanism 객체를 돌려줍니다. |
static ExemptionMechanism |
getInstance (String algorithm,
Provider provider)
지정한 Exemption Mechanism 알고리즘을 구현하는 ExemptionMechanism 객체를 돌려줍니다. |
static ExemptionMechanism |
getInstance (String algorithm,
String provider)
지정한 Exemption Mechanism 알고리즘을 구현하는 ExemptionMechanism 객체를 돌려줍니다. |
String |
getName ()
이 ExemptionMechanism 객체의 Exemption Mechanism명을 돌려줍니다. |
int |
getOutputSize (int inputLen)
입력의 길이 inputLen (바이트 단위)를 지정해, 다음의 genExemptionBlob 조작의 결과를 보관 유지하기 위해서 필요한 출력 버퍼의 길이를 바이트수로 돌려줍니다. |
Provider |
getProvider ()
이 ExemptionMechanism 객체의 프로바이더를 돌려줍니다. |
void |
init (Key key)
열쇠를 사용해 이 Exemption Mechanism를 초기화합니다. |
void |
init (Key key,
AlgorithmParameters params)
열쇠와 알고리즘 파라미터세트를 사용해 이 Exemption Mechanism를 초기화합니다. |
void |
init (Key key,
AlgorithmParameterSpec params)
열쇠와 알고리즘 파라미터세트를 사용해 이 Exemption Mechanism를 초기화합니다. |
boolean |
isCryptoAllowed (Key key)
이 Exemption Mechanism에 의해 결과 Blob 가 정상적으로 생성되었는지의 여부를 돌려줍니다. |
클래스 java.lang. Object 로부터 상속된 메소드 |
---|
clone , equals , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
생성자 의 상세 |
---|
protected ExemptionMechanism(ExemptionMechanismSpi exmechSpi, Provider provider, String mechanism)
exmechSpi
- delegateprovider
- 프로바이더mechanism
- Exemption Mechanism메소드의 상세 |
---|
public final String getName()
ExemptionMechanism
객체의 Exemption Mechanism명을 돌려줍니다.
이것은, 이 ExemptionMechanism
객체를 생성한 getInstance
호출의 1 개로 지정된 이름과 같습니다.
ExemptionMechanism
객체의 Exemption Mechanism명public static final ExemptionMechanism getInstance(String algorithm) throws NoSuchAlgorithmException
ExemptionMechanism
객체를 돌려줍니다.
이 메소드는, 최우선의 프로바이더로부터 순서에, 등록을 마친 시큐리티 프로바이더의 리스트를 횡단(traverse) 합니다. 지정된 알고리즘을 지원하는 최초의 프로바이더로부터의 ExemptionMechanismSpi 의 구현을 캡슐화하는 새로운 ExemptionMechanism 객체가 돌려주어집니다.
등록이 끝난 프로바이더의 리스트는,Security.getProviders()
메소드 경유로 취득할 수 있습니다.
algorithm
- 요구된 Exemption Mechanism의 표준명
표준의 Exemption Mechanism명에 대해서는, 「Java 암호화 아키텍쳐(architecture) 레퍼런스 가이드」의 부록 A 를 참조
ExemptionMechanism
객체
NullPointerException
- algorithm
가 null 의 경우
NoSuchAlgorithmException
- 지정한 알고리즘의 ExemptionMechanismSpi 구현을 지원하는 프로바이더가 존재하지 않는 경우Provider
public static final ExemptionMechanism getInstance(String algorithm, String provider) throws NoSuchAlgorithmException , NoSuchProviderException
ExemptionMechanism
객체를 돌려줍니다.
지정된 프로바이더의 ExemptionMechanismSpi 구현을 캡슐화하는 새로운 ExemptionMechanism 객체가 돌려주어집니다. 지정한 프로바이더는, 시큐리티 프로바이더 리스트에 등록할 필요가 있습니다.
등록이 끝난 프로바이더의 리스트는,Security.getProviders()
메소드 경유로 취득할 수 있습니다.
algorithm
- 요구된 Exemption Mechanism의 표준명
표준의 Exemption Mechanism명에 대해서는, 「Java 암호화 아키텍쳐(architecture) 레퍼런스 가이드」의 부록 A 를 참조provider
- 프로바이더명
ExemptionMechanism
객체
NullPointerException
- algorithm
가 null 의 경우
NoSuchAlgorithmException
- 지정된 프로바이더로 지정된 알고리즘의 ExemptionMechanismSpi 구현이 없는 경우
NoSuchProviderException
- 지정한 프로바이더가 시큐리티 프로바이더 리스트에 등록되지 않은 경우
IllegalArgumentException
- provider
가 null 또는 빈 상태(empty)의 경우Provider
public static final ExemptionMechanism getInstance(String algorithm, Provider provider) throws NoSuchAlgorithmException
ExemptionMechanism
객체를 돌려줍니다.
지정된 Provider 객체의 ExemptionMechanismSpi 구현을 캡슐화하는 새로운 ExemptionMechanism 객체가 돌려주어집니다. 지정한 Provider 객체는, 프로바이더 리스트에 등록할 필요는 없습니다.
algorithm
- 요구된 Exemption Mechanism의 표준명
표준의 Exemption Mechanism명에 대해서는, 「Java 암호화 아키텍쳐(architecture) 레퍼런스 가이드」의 부록 A 를 참조provider
- 프로바이더
ExemptionMechanism
객체
NullPointerException
- algorithm
가 null 의 경우
NoSuchAlgorithmException
- 지정된 Provider 객체로 지정된 알고리즘의 ExemptionMechanismSpi 구현이 없는 경우
IllegalArgumentException
- provider
가 null 의 경우Provider
public final Provider getProvider()
ExemptionMechanism
객체의 프로바이더를 돌려줍니다.
ExemptionMechanism
객체의 프로바이더public final boolean isCryptoAllowed(Key key) throws ExemptionMechanismException
이 메소드는, 건네받은 열쇠가, 이 Exemption Mechanism가 초기화 및 생성 단계에서 사용한 열쇠와 같은 것도 확인합니다.
key
- 암호가 사용하는 열쇠
key
가 null 의 경우는 false
ExemptionMechanismException
- 이 Exemption Mechanism 객체에 의해 결과 Blob 가 정상적으로 생성되었는지의 여부를 판정할 때에 문제가 발견되었을 경우public final int getOutputSize(int inputLen) throws IllegalStateException
inputLen
(바이트 단위)를 지정해, 다음의 genExemptionBlob
조작의 결과를 보관 유지하기 위해서 필요한 출력 버퍼의 길이를 바이트수로 돌려줍니다.
다음의 genExemptionBlob
호출의 실제의 출력 길이은, 이 메소드가 돌려주는 길이보다 작은 일이 있습니다.
inputLen
- 입력 길이 (바이트 단위)
IllegalStateException
- 이 Exemption Mechanism가 잘못한 상태에 있는 경우 ( 아직 초기화되어 있지 않은 등)public final void init(Key key) throws InvalidKeyException , ExemptionMechanismException
이 Exemption Mechanism가, 지정된 key
로부터 파생할 수 없는 알고리즘 파라미터를 필요로 하는 경우, 기본이 되는 Exemption Mechanism의 구현은, 프로바이더 고유의 디폴트 값를 사용해 필요한 파라미터 자체를 생성합니다. 알고리즘 파라미터를 호출해 옆에서 지정할 필요가 있는 경우는,InvalidKeyException
가 발생합니다.
key
- 이 Exemption Mechanism의 열쇠
InvalidKeyException
- 지정된 열쇠가 이 Exemption Mechanism에 올바르지 않은 경우
ExemptionMechanismException
- 초기화의 처리로 문제가 발견되었을 경우public final void init(Key key, AlgorithmParameterSpec params) throws InvalidKeyException , InvalidAlgorithmParameterException , ExemptionMechanismException
이 Exemption Mechanism가 알고리즘 파라미터를 필요로 해,params
가 null 인 경우, 기본이 되는 Exemption Mechanism의 구현은, 프로바이더 고유의 디폴트 값를 사용해 필요한 파라미터 자체를 생성합니다. 알고리즘 파라미터를 호출해 옆에서 지정할 필요가 있는 경우는,InvalidAlgorithmParameterException
가 발생합니다.
key
- 이 Exemption Mechanism의 열쇠params
- 알고리즘 파라미터
InvalidKeyException
- 지정된 열쇠가 이 Exemption Mechanism에 올바르지 않은 경우
InvalidAlgorithmParameterException
- 지정된 알고리즘 파라미터가 이 Exemption Mechanism에 올바르지 않은 경우
ExemptionMechanismException
- 초기화의 처리로 문제가 발견되었을 경우public final void init(Key key, AlgorithmParameters params) throws InvalidKeyException , InvalidAlgorithmParameterException , ExemptionMechanismException
이 Exemption Mechanism가 알고리즘 파라미터를 필요로 해,params
가 null 인 경우, 기본이 되는 Exemption Mechanism의 구현은, 프로바이더 고유의 디폴트 값를 사용해 필요한 파라미터 자체를 생성합니다. 알고리즘 파라미터를 호출해 옆에서 지정할 필요가 있는 경우는,InvalidAlgorithmParameterException
가 발생합니다.
key
- 이 Exemption Mechanism의 열쇠params
- 알고리즘 파라미터
InvalidKeyException
- 지정된 열쇠가 이 Exemption Mechanism에 올바르지 않은 경우
InvalidAlgorithmParameterException
- 지정된 알고리즘 파라미터가 이 Exemption Mechanism에 올바르지 않은 경우
ExemptionMechanismException
- 초기화의 처리로 문제가 발견되었을 경우public final byte[] genExemptionBlob() throws IllegalStateException , ExemptionMechanismException
IllegalStateException
- 이 Exemption Mechanism가 잘못한 상태에 있는 경우 (초기화되어 있지 않은 등)
ExemptionMechanismException
- 생성의 처리로 문제가 발견되었을 경우public final int genExemptionBlob(byte[] output) throws IllegalStateException , ShortBufferException , ExemptionMechanismException
output
버퍼에 포함합니다.
output
버퍼가 너무 작아 결과를 보관 유지할 수 없는 경우는,ShortBufferException
가 throw 됩니다. 이 경우, 보다 큰 출력 버퍼를 사용해 이 호출을 반복합니다. getOutputSize
를 사용해, 필요한 출력 버퍼의 사이즈를 판정합니다.
output
- 결과를 포함하는 버퍼
output
에 포함된 바이트수
IllegalStateException
- 이 Exemption Mechanism가 잘못한 상태에 있는 경우 (초기화되어 있지 않은 등)
ShortBufferException
- 지정된 출력 버퍼가 너무 작아 결과를 보관 유지할 수 없는 경우
ExemptionMechanismException
- 생성의 처리로 문제가 발견되었을 경우public final int genExemptionBlob(byte[] output, int outputOffset) throws IllegalStateException , ShortBufferException , ExemptionMechanismException
outputOffset
로부터 시작되는 output
버퍼에 포함합니다.
output
버퍼가 너무 작아 결과를 보관 유지할 수 없는 경우는,ShortBufferException
가 throw 됩니다. 이 경우, 보다 큰 출력 버퍼를 사용해 이 호출을 반복합니다. getOutputSize
를 사용해, 필요한 출력 버퍼의 사이즈를 판정합니다.
output
- 결과를 포함하는 버퍼outputOffset
- 결과가 포함되는 output
내의 오프셋(offset)
output
에 포함된 바이트수
IllegalStateException
- 이 Exemption Mechanism가 잘못한 상태에 있는 경우 (초기화되어 있지 않은 등)
ShortBufferException
- 지정된 출력 버퍼가 너무 작아 결과를 보관 유지할 수 없는 경우
ExemptionMechanismException
- 생성의 처리로 문제가 발견되었을 경우protected void finalize()
Object
내의 finalize
|
JavaTM Platform Standard Ed. 6 |
|||||||||
앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요: 상자 | 필드 | 생성자 | 메소드 | 상세: 필드 | 생성자 | 메소드 |
Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy 도 참조해 주세요.