|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
°³¿ä: NESTED | Çʵå | constructor | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå |
java.lang.Objectjavax.crypto.KeyAgreementSpi
public abstract class KeyAgreementSpi
ÀÌ Å¬·¡½º´Â KeyAgreement
Ŭ·¡½ºÀÇ Service Provider Interface (SPI)¸¦ Á¤ÀÇÇÕ´Ï´Ù. ƯÁ¤ÀÇ Å° ÇÕÀÇ ¾Ë°í¸®ÁòÀÇ ±¸ÇöÀ» Á¦°øÇÏ´Â °¢ ¾ÏÈ£È ¼ºñ½º ÇÁ·Î¹ÙÀÌ´õ´Â ÀÌ Å¬·¡½ºÀÇ ¸ðµç Ãß»ó ¸Þ¼µå¸¦ ±¸ÇöÇÒ Çʿ䰡 ÀÖ½À´Ï´Ù.
°øÀ¯ÀÇ ºñ¹Ð Á¤º¸ÀÇ È®¸³¿¡ °ü°èµÈ
Ű´Â Ű Á¦³×·¹ÀÌÅÍ (KeyPairGenerator
¶Ç´Â KeyGenerator
)ÀÇ 1°³, ¶Ç´Â KeyFactory
¿¡
ÀÇÇØ ȤÀº Ű ÇÕÀÇ ÇÁ·ÎÅäÄÝ (@see #engineDoPhase(java.security.Key, boolean) engineDoPhase)ÀÇ Áß°£ ´Ü°èÀÇ °á°ú·Î¼ ÀÛ¼ºµË´Ï´Ù.
Ű ±³È¯ÀÇ ´ëÀÀ °ü°è ¸¶´Ù, engineDoPhase
¸¦ È£ÃâÇÒ Çʿ䰡 ÀÖ½À´Ï´Ù. ¿¹¸¦ µé¾î
Ű ±³È¯ÀÇ »ó´ë°¡ 1°³ÀÇ °æ¿ì´Â lastPhase
Ç÷¡±×¸¦ true
·Î
¼³Á¤ÇØ engineDoPhase
¸¦ 1ȸ
È£ÃâÇÒ Çʿ䰡 ÀÖ½À´Ï´Ù. Ű ±³È¯ÀÇ »ó´ë°¡ 2°³ÀÇ °æ¿ì´Â óÀ½Àº lastPhase
Ç÷¡±×¸¦ false
·Î
¼³Á¤ÇØ, 2¹øÂ°´Â true
·Î
¼³Á¤ÇØ, engineDoPhase
¸¦ 2ȸ È£ÃâÇÒ Çʿ䰡 ÀÖ½À´Ï´Ù. Ű ±³È¯ÀÇ »ó´ëÀÇ ¼ö´Â ÀÓÀÇÀÔ´Ï´Ù.
KeyGenerator
,
SecretKey
»ý¼ºÀÚ °³¿ä | |
---|---|
KeyAgreementSpi ()
|
¸Þ¼µå °³¿ä | |
---|---|
protected abstract Key |
engineDoPhase (Key key,
boolean lastPhase)
ÀÌ Å° ÇÕÀÇ¿¡ °ü°èµÈ »ó´ëÀÇ ´©±º°¡·ÎºÎÅÍ ¹ÞÀº ÁöÁ¤µÈ ۸¦ »ç¿ëÇØ ÀÌ Å° ÇÕÀÇÀÇ ´ÙÀ½ÀÇ ´Ü°è¸¦ ½ÇÇàÇÕ´Ï´Ù. |
protected abstract byte[] |
engineGenerateSecret ()
°øÀ¯ÀÇ ºñ¹Ð Á¤º¸¸¦ »ý¼ºÇØ »õ·Î¿î ¹öÆÛ³»¿¡ ¸®ÅÏÇÕ´Ï´Ù. |
protected abstract int |
engineGenerateSecret (byte[] sharedSecret,
int offset)
°øÀ¯ÀÇ ºñ¹Ð Á¤º¸¸¦ »ý¼ºÇØ, offset ·Î
ºÎÅÍ ½ÃÀ۵Ǵ sharedSecret ¹öÆÛ³»¿¡ Æ÷ÇÔÇÕ´Ï´Ù. |
protected abstract SecretKey |
engineGenerateSecret (String algorithm)
°øÀ¯ÀÇ ºñ¹Ð Á¤º¸¸¦ ÀÛ¼ºÇØ, ±×°ÍÀÌ ¿ä±¸µÈ ¾Ë°í¸®ÁòÇüÀÇ ºñ¹ÐŰ °´Ã¼·Î¼ ¸®ÅÏÇÕ´Ï´Ù. |
protected abstract void |
engineInit (Key key,
AlgorithmParameterSpec params,
SecureRandom random)
ÁöÁ¤µÈ Ű, ¾Ë°í¸®Áò ÆÄ¶ó¹ÌÅͼ¼Æ® ¹× ³¼öÀÇ ¹ß»ý¿øÀ» »ç¿ëÇØ ÀÌ Å° ÇÕÀǸ¦ ÃʱâÈÇÕ´Ï´Ù. |
protected abstract void |
engineInit (Key key,
SecureRandom random)
ÁöÁ¤µÈ Ű¿Í ³¼öÀÇ ¹ß»ý¿øÀ¸·Î ÀÌ Å° ÇÕÀǸ¦ ÃʱâÈÇÕ´Ï´Ù. |
Ŭ·¡½º java.lang. Object ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼µå |
---|
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
»ý¼ºÀÚ »ó¼¼ |
---|
public KeyAgreementSpi()
¸Þ¼µåÀÇ »ó¼¼ |
---|
protected abstract void engineInit(Key key, SecureRandom random) throws InvalidKeyException
Ű ÇÕÀÇ ¾Ë°í¸®ÁòÀÌ ³¼ö ¹ÙÀÌÆ®¸¦ ÇÊ¿ä·Î ÇÏ´Â °æ¿ì´Â ÁöÁ¤µÈ ³¼öÀÇ ¹ß»ý¿ø random
·Î
ºÎÅÍ ÃëµæÇÕ´Ï´Ù. ´Ù¸¸, ±âº»ÀÌ µÇ´Â ¾Ë°í¸®Áò ±¸ÇöÀÌ ³¼ö ¹ÙÀÌÆ®¸¦ ÇÊ¿ä·Î ÇÏÁö ¾Ê´Â °æ¿ì, random
´Â ¹«½ÃµË´Ï´Ù.
key
- ´ç»çÀÚÀÇ ºñ°ø°³ Á¤º¸. ¿¹¸¦ µé¾î
Diffie-Hellman
Ű ÇÕÀÇÀÇ °æ¿ì´Â ´ç»çÀÚ ÀÚ½ÅÀÇ Diffie-Hellman ºñ°ø°³Å°random
- ³¼öÀÇ ¼Ò½º
InvalidKeyException
- ÁöÁ¤µÈ ۰¡ ÀÌ Å° ÇÕÀÇ¿¡ ºÎÀûÀýÇÑ °æ¿ì. ¿¹¸¦ µé¾î
ÇüŰ¡ À߸øµÇ¾î ÀÖ´Â °æ¿ì, ¶Ç´Â ¾Ë°í¸®ÁòÀÇ ÇüÅ¿¡ ȣȯ¼ºÀÌ ¾ø´Â °æ¿ìprotected abstract void engineInit(Key key, AlgorithmParameterSpec params, SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException
key
- ´ç»çÀÚÀÇ ºñ°ø°³ Á¤º¸. ¿¹¸¦ µé¾î
Diffie-Hellman
Ű ÇÕÀÇÀÇ °æ¿ì´Â ´ç»çÀÚ ÀÚ½ÅÀÇ Diffie-Hellman ºñ°ø°³Å°params
- Ű ÇÕÀÇ ÆÄ¶ó¹ÌÅÍrandom
- ³¼öÀÇ ¼Ò½º
InvalidKeyException
- ÁöÁ¤µÈ ۰¡ ÀÌ Å° ÇÕÀÇ¿¡ ºÎÀûÀýÇÑ °æ¿ì. ¿¹¸¦ µé¾î
ÇüŰ¡ À߸øµÇ¾î ÀÖ´Â °æ¿ì, ¶Ç´Â ¾Ë°í¸®ÁòÀÇ ÇüÅ¿¡ ȣȯ¼ºÀÌ ¾ø´Â °æ¿ì
InvalidAlgorithmParameterException
- ÁöÁ¤µÈ ÆÄ¶ó¹ÌÅͰ¡ ÀÌ Å° ÇÕÀÇ¿¡ ºÎÀûÀýÇÑ °æ¿ìprotected abstract Key engineDoPhase(Key key, boolean lastPhase) throws InvalidKeyException, IllegalStateException
key
- ÀÌ ´Ü°èÀÇ Å°. ¿¹¸¦ µé¾î
2 ´ç»çÀÚ »çÀÌÀÇ Diffie-HellmanÀÎ °æ¿ì´Â »ó´ëÀÇ Diffie-Hellman °ø°³Å°lastPhase
- À̰ÍÀÌ ÀÌ Å° ÇÕÀÇÀÇ ¸¶Áö¸· ´Ü°èÀΰ¡ ¾î¶²°¡¸¦ ³ªÅ¸³»´Â Ç÷¡±×
InvalidKeyException
- ÁöÁ¤µÈ ۰¡ ÀÌ ´Ü°è¿¡ ºÎÀûÀýÇÑ °æ¿ì
IllegalStateException
- ÀÌ Å° ÇÕÀǰ¡ ÃʱâȵǾî ÀÖÁö ¾ÊÀº °æ¿ìprotected abstract byte[] engineGenerateSecret() throws IllegalStateException
ÀÌ ¸Þ¼µå´Â ÀÌ KeyAgreementSpi
°´Ã¼¸¦ ¸®¼Â ÇϹǷΠ°Ô´Ù°¡ ´Ù¸¥ Ű ÇÕÀÇ¿¡ Àç»ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù. ÀÌ Å° ÇÕÀǰ¡ engineInit
¸Þ¼µåÀÇ 1°³
·Î ÀçÃʱâȵÇÁö ¾Ê´Â °æ¿ì, ±× ÈÄÀÇ Å° ÇÕÀÇ¿¡¼´Â °°Àº ºñ°ø°³ Á¤º¸¿Í ¾Ë°í¸®Áò ÆÄ¶ó¹ÌÅͰ¡ »ç¿ëµË´Ï´Ù.
IllegalStateException
- ÀÌ Å° ÇÕÀǰ¡ ¾ÆÁ÷ ¿Ï·áÇϰí ÀÖÁö ¾Ê´Â °æ¿ìprotected abstract int engineGenerateSecret(byte[] sharedSecret, int offset) throws IllegalStateException, ShortBufferException
offset
·Î
ºÎÅÍ ½ÃÀ۵Ǵ sharedSecret
¹öÆÛ³»¿¡ Æ÷ÇÔÇÕ´Ï´Ù.
sharedSecret
¹öÆÛ°¡ ³Ê¹« ÀÛ¾Æ °á°ú¸¦ º¸°ü À¯ÁöÇÒ ¼ö ¾ø´Â °æ¿ì´Â ShortBufferException
°¡ ¹ß»ý µË´Ï´Ù. ÀÌ °æ¿ì
º¸´Ù Å« Ãâ·Â ¹öÆÛ¸¦ »ç¿ëÇØ ÀÌ È£ÃâÀ» ¹Ýº¹ÇÕ´Ï´Ù.
ÀÌ ¸Þ¼µå´Â ÀÌ KeyAgreementSpi
°´Ã¼¸¦ ¸®¼Â ÇϹǷΠ°Ô´Ù°¡ ´Ù¸¥ Ű ÇÕÀÇ¿¡ Àç»ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù. ÀÌ Å° ÇÕÀǰ¡ engineInit
¸Þ¼µåÀÇ 1°³
·Î ÀçÃʱâȵÇÁö ¾Ê´Â °æ¿ì, ±× ÈÄÀÇ Å° ÇÕÀÇ¿¡¼´Â °°Àº ºñ°ø°³ Á¤º¸¿Í ¾Ë°í¸®Áò ÆÄ¶ó¹ÌÅͰ¡ »ç¿ëµË´Ï´Ù.
sharedSecret
- °øÀ¯ÀÇ ºñ¹Ð Á¤º¸¸¦ Æ÷ÇÔÇÏ´Â ¹öÆÛoffset
- °øÀ¯ÀÇ ºñ¹Ð Á¤º¸°¡ Æ÷ÇԵǴ sharedSecret
³»ÀÇ ¿ÀÇÁ¼Â(offset)
sharedSecret
¿¡ Æ÷ÇÔµÈ ¹ÙÀÌÆ®¼ö
IllegalStateException
- ÀÌ Å° ÇÕÀǰ¡ ¾ÆÁ÷ ¿Ï·áÇϰí ÀÖÁö ¾Ê´Â °æ¿ì
ShortBufferException
- ÁöÁ¤µÈ Ãâ·Â ¹öÆÛ°¡ ³Ê¹« ÀÛ¾Æ ºñ¹Ð Á¤º¸¸¦ º¸°ü À¯ÁöÇÒ ¼ö ¾ø´Â °æ¿ìprotected abstract SecretKey engineGenerateSecret(String algorithm) throws IllegalStateException, NoSuchAlgorithmException, InvalidKeyException
ÀÌ ¸Þ¼µå´Â ÀÌ KeyAgreementSpi
°´Ã¼¸¦ ¸®¼Â ÇϹǷΠ°Ô´Ù°¡ ´Ù¸¥ Ű ÇÕÀÇ¿¡ Àç»ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù. ÀÌ Å° ÇÕÀǰ¡ engineInit
¸Þ¼µåÀÇ 1°³
·Î ÀçÃʱâȵÇÁö ¾Ê´Â °æ¿ì, ±× ÈÄÀÇ Å° ÇÕÀÇ¿¡¼´Â °°Àº ºñ°ø°³ Á¤º¸¿Í ¾Ë°í¸®Áò ÆÄ¶ó¹ÌÅͰ¡ »ç¿ëµË´Ï´Ù.
algorithm
- ¿ä±¸µÈ ºñ¹ÐŰ ¾Ë°í¸®Áò
IllegalStateException
- ÀÌ Å° ÇÕÀǰ¡ ¾ÆÁ÷ ¿Ï·áÇϰí ÀÖÁö ¾Ê´Â °æ¿ì
NoSuchAlgorithmException
- ¿ä±¸µÈ ºñ¹ÐŰ ¾Ë°í¸®ÁòÀÌ ¾ø´Â °æ¿ì
InvalidKeyException
- °øÀ¯ÀÇ ºñ¹ÐŰ µ¥ÀÌÅ͸¦ »ç¿ëÇØ, ¿ä±¸µÈ ¾Ë°í¸®ÁòÇüÀÇ ºñ¹Ð۸¦ »ý¼ºÇÒ ¼ö ¾ø´Â °æ¿ì (¿¹¸¦ µé¾î
Ű µ¥ÀÌÅͰ¡ ³Ê¹« ª´Ù)
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
°³¿ä: NESTED | Çʵå | constructor | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå |
Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy µµ ÂüÁ¶ÇϽʽÿÀ.