|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
°³¿ä: NESTED | Çʵå | constructor | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå |
java.lang.Objectjavax.crypto.KeyAgreement
public class KeyAgreement
ÀÌ Å¬·¡½º´Â ŰÀÇ ÇÕÀÇ ÇÁ·ÎÅäÄÝ, Áï ŰÀÇ ±³È¯ ÇÁ·ÎÅäÄÝÀÇ ±â´ÉÀ» Á¦°øÇÕ´Ï´Ù. °øÀ¯ÀÇ ºñ¹Ð Á¤º¸ÀÇ È®¸³¿¡ °ü°èµÈ
Ű´Â Ű Á¦³×·¹ÀÌÅÍ (KeyPairGenerator
¶Ç´Â KeyGenerator
)ÀÇ 1°³, ¶Ç´Â KeyFactory
¿¡
ÀÇÇØ ȤÀº Ű ÇÕÀÇ ÇÁ·ÎÅäÄÝÀÇ Áß°£ ´Ü°èÀÇ °á°ú·Î¼ ÀÛ¼ºµË´Ï´Ù.
Ű ±³È¯ÀÇ ´ëÀÀ °ü°è ¸¶´Ù, doPhase
¸¦ È£ÃâÇÒ Çʿ䰡 ÀÖ½À´Ï´Ù. ¿¹¸¦ µé¾î
Ű ±³È¯ÀÇ »ó´ë°¡ 1°³ÀÇ °æ¿ì´Â lastPhase
Ç÷¡±×¸¦ true
·Î
¼³Á¤ÇØ doPhase
¸¦ 1ȸ
È£ÃâÇÒ Çʿ䰡 ÀÖ½À´Ï´Ù. Ű ±³È¯ÀÇ »ó´ë°¡ 2°³ÀÇ °æ¿ì´Â óÀ½Àº lastPhase
Ç÷¡±×¸¦ false
·Î
¼³Á¤ÇØ, 2¹øÂ°´Â true
·Î
¼³Á¤ÇØ, doPhase
¸¦ 2ȸ È£ÃâÇÒ Çʿ䰡 ÀÖ½À´Ï´Ù. Ű ±³È¯ÀÇ »ó´ëÀÇ ¼ö´Â ÀÓÀÇÀÔ´Ï´Ù.
KeyGenerator
,
SecretKey
»ý¼ºÀÚ °³¿ä | |
---|---|
protected |
KeyAgreement (KeyAgreementSpi keyAgreeSpi,
Provider provider,
String algorithm)
KeyAgreement °´Ã¼¸¦ ÀÛ¼ºÇÕ´Ï´Ù. |
¸Þ¼µå °³¿ä | |
---|---|
Key |
doPhase (Key key,
boolean lastPhase)
ÀÌ Å° ÇÕÀÇ¿¡ °ü°èµÈ »ó´ëÀÇ ´©±º°¡·ÎºÎÅÍ ¹ÞÀº ÁöÁ¤µÈ ۸¦ »ç¿ëÇØ ÀÌ Å° ÇÕÀÇÀÇ ´ÙÀ½ÀÇ ´Ü°è¸¦ ½ÇÇàÇÕ´Ï´Ù. |
byte[] |
generateSecret ()
°øÀ¯ÀÇ ºñ¹Ð Á¤º¸¸¦ »ý¼ºÇØ »õ·Î¿î ¹öÆÛ³»¿¡ ¸®ÅÏÇÕ´Ï´Ù. |
int |
generateSecret (byte[] sharedSecret,
int offset)
°øÀ¯ÀÇ ºñ¹Ð Á¤º¸¸¦ »ý¼ºÇØ, offset ·Î
ºÎÅÍ ½ÃÀ۵Ǵ sharedSecret ¹öÆÛ³»¿¡ Æ÷ÇÔÇÕ´Ï´Ù. |
SecretKey |
generateSecret (String algorithm)
°øÀ¯ÀÇ ºñ¹Ð Á¤º¸¸¦ ÀÛ¼ºÇØ, ±×°ÍÀÌ ÁöÁ¤µÈ ¾Ë°í¸®ÁòÀÇ SecretKey °´Ã¼·Î¼ ¸®ÅÏÇÕ´Ï´Ù. |
String |
getAlgorithm ()
ÀÌ KeyAgreement °´Ã¼ÀÇ ¾Ë°í¸®Áò¸íÀ» ¸®ÅÏÇÕ´Ï´Ù. |
static KeyAgreement |
getInstance (String algorithm)
ÁöÁ¤µÈ Ű ÇÕÀÇ ¾Ë°í¸®ÁòÀ» ±¸ÇöÇÏ´Â KeyAgreement °´Ã¼¸¦ ÀÛ¼ºÇÕ´Ï´Ù. |
static KeyAgreement |
getInstance (String algorithm,
Provider provider)
ÁöÁ¤µÈ ÇÁ·Î¹ÙÀÌ´õ·ÎºÎÅÍ, ÁöÁ¤µÈ Ű ÇÕÀÇ ¾Ë°í¸®ÁòÀÇ KeyAgreement °´Ã¼¸¦ »ý¼ºÇÕ´Ï´Ù. |
static KeyAgreement |
getInstance (String algorithm,
String provider)
ÁöÁ¤µÈ ÇÁ·Î¹ÙÀÌ´õ·ÎºÎÅÍ, ÁöÁ¤µÈ Ű ÇÕÀÇ ¾Ë°í¸®ÁòÀÇ KeyAgreement °´Ã¼¸¦ ÀÛ¼ºÇÕ´Ï´Ù. |
Provider |
getProvider ()
ÀÌ KeyAgreement °´Ã¼ÀÇ ÇÁ·Î¹ÙÀÌ´õ¸¦ ¸®ÅÏÇÕ´Ï´Ù. |
void |
init (Key key)
ÁöÁ¤µÈ Ű·Î ÀÌ Å° ÇÕÀǸ¦ ÃʱâÈÇÕ´Ï´Ù. |
void |
init (Key key,
AlgorithmParameterSpec params)
ÁöÁ¤µÈ Ű¿Í ¾Ë°í¸®Áò ÆÄ¶ó¹ÌÅͼ¼Æ®¸¦ »ç¿ëÇØ ÀÌ Å° ÇÕÀǸ¦ ÃʱâÈÇÕ´Ï´Ù. |
void |
init (Key key,
AlgorithmParameterSpec params,
SecureRandom random)
ÁöÁ¤µÈ Ű, ¾Ë°í¸®Áò ÆÄ¶ó¹ÌÅͼ¼Æ® ¹× ³¼öÀÇ ¹ß»ý¿øÀ» »ç¿ëÇØ ÀÌ Å° ÇÕÀǸ¦ ÃʱâÈÇÕ´Ï´Ù. |
void |
init (Key key,
SecureRandom random)
ÁöÁ¤µÈ Ű¿Í ³¼öÀÇ ¹ß»ý¿øÀ¸·Î ÀÌ Å° ÇÕÀǸ¦ ÃʱâÈÇÕ´Ï´Ù. |
Ŭ·¡½º java.lang. Object ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼µå |
---|
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
»ý¼ºÀÚ »ó¼¼ |
---|
protected KeyAgreement(KeyAgreementSpi keyAgreeSpi, Provider provider, String algorithm)
keyAgreeSpi
- À§¾çóprovider
- ÇÁ·Î¹ÙÀÌ´õalgorithm
- ¾Ë°í¸®Áò¸Þ¼µåÀÇ »ó¼¼ |
---|
public final String getAlgorithm()
KeyAgreement
°´Ã¼ÀÇ ¾Ë°í¸®Áò¸íÀ» ¸®ÅÏÇÕ´Ï´Ù.
À̰ÍÀº ÀÌ KeyAgreement
°´Ã¼¸¦ ÀÛ¼ºÇÑ getInstance
È£ÃâÀÇ 1°³
·Î ÁöÁ¤µÈ À̸§°ú °°½À´Ï´Ù.
KeyAgreement
°´Ã¼ÀÇ ¾Ë°í¸®Áò¸ípublic static final KeyAgreement getInstance(String algorithm) throws NoSuchAlgorithmException
KeyAgreement
°´Ã¼¸¦ ÀÛ¼ºÇÕ´Ï´Ù. µðÆúÆ®ÀÇ ÇÁ·Î¹ÙÀÌ´õÀÇ ÆÐŰÁö°¡ ¿ä±¸µÈ Ű ÇÕÀÇ ¾Ë°í¸®ÁòÀÇ ±¸ÇöÀ» Á¦°øÇϰí ÀÖ´Â °æ¿ì´Â ±× ±¸ÇöÀ» °¡Áø KeyAgreement
Ŭ·¡½ºÀÇ ÀνºÅϽº°¡ ¸®Åϵ˴ϴÙ
. ¾Ë°í¸®ÁòÀÌ µðÆúÆ®ÀÇ ÆÐŰÁö·Î ¾òÀ» ¼ö ¾ø´Â °æ¿ì´Â ´Ù¸¥ ÇÁ·Î¹ÙÀÌ´õ ÆÐŰÁö°¡ °Ë»öµË´Ï´Ù.
algorithm
- ¿ä±¸µÈ Ű ÇÕÀÇ ¾Ë°í¸®ÁòÀÇ Ç¥ÁØÀûÀÎ À̸§. ¾Ë°í¸®ÁòÀÇ Ç¥ÁØ¸í¿¡ ´ëÇØ¼´Â ¡¸Java ¾ÏÈ£È ¾ÆÅ°ÅØÃÄ API
»ç¾ç ¹× ·¹ÆÛ·±½º¡¹ÀÇ ºÎ·Ï A¸¦ ÂüÁ¶
KeyAgreement
°´Ã¼
NullPointerException
- ÁöÁ¤µÈ ¾Ë°í¸®ÁòÀÌ nullÀÎ °æ¿ì
NoSuchAlgorithmException
- ÁöÁ¤µÈ ¾Ë°í¸®ÁòÀÌ, µðÆúÆ®ÀÇ ÇÁ·Î¹ÙÀÌ´õ ÆÐŰÁö¿¡µµ, °Ë»öÇÑ °Í ¿ÜÀÇ ÇÁ·Î¹ÙÀÌ´õ ÆÐŰÁö¿¡µµ ¾ø´Â °æ¿ìpublic static final KeyAgreement getInstance(String algorithm, String provider) throws NoSuchAlgorithmException, NoSuchProviderException
KeyAgreement
°´Ã¼¸¦ ÀÛ¼ºÇÕ´Ï´Ù.
algorithm
- ¿ä±¸µÈ Ű ÇÕÀÇ ¾Ë°í¸®ÁòÀÇ Ç¥ÁØÀûÀÎ À̸§. ¾Ë°í¸®ÁòÀÇ Ç¥ÁØ¸í¿¡ ´ëÇØ¼´Â ¡¸Java ¾ÏÈ£È ¾ÆÅ°ÅØÃÄ API
»ç¾ç ¹× ·¹ÆÛ·±½º¡¹ÀÇ ºÎ·Ï A¸¦ ÂüÁ¶provider
- ÇÁ·Î¹ÙÀÌ´õ¸í
KeyAgreement
°´Ã¼
NullPointerException
- ÁöÁ¤µÈ ¾Ë°í¸®ÁòÀÌ nullÀÎ °æ¿ì
NoSuchAlgorithmException
- ÁöÁ¤µÈ ÇÁ·Î¹ÙÀÌ´õ·Î ÁöÁ¤µÈ ¾Ë°í¸®ÁòÀÌ ¾ø´Â °æ¿ì
NoSuchProviderException
- ÁöÁ¤µÈ ÇÁ·Î¹ÙÀÌ´õ°¡ ¼³Á¤µÇ¾î ÀÖÁö ¾ÊÀº °æ¿ì
IllegalArgumentException
- provider
°¡ nullÀÎ °æ¿ìpublic static final KeyAgreement getInstance(String algorithm, Provider provider) throws NoSuchAlgorithmException
KeyAgreement
°´Ã¼¸¦ »ý¼ºÇÕ´Ï´Ù. provider
´Â µî·ÏµÇ¾î ÀÖÀ» ÇÊ¿ä´Â ¾ø´Â °Í¿¡ ÁÖÀÇÇØ ÁÖ¼¼¿ä.
algorithm
- ¿ä±¸µÈ Ű ÇÕÀÇ ¾Ë°í¸®ÁòÀÇ Ç¥ÁØÀûÀÎ À̸§. ¾Ë°í¸®ÁòÀÇ Ç¥ÁØ¸í¿¡ ´ëÇØ¼´Â ¡¸Java ¾ÏÈ£È ¾ÆÅ°ÅØÃÄ API
»ç¾ç ¹× ·¹ÆÛ·±½º¡¹ÀÇ ºÎ·Ï A¸¦ ÂüÁ¶provider
- ÇÁ·Î¹ÙÀÌ´õ
KeyAgreement
°´Ã¼
NullPointerException
- ÁöÁ¤µÈ ¾Ë°í¸®ÁòÀÌ nullÀÎ °æ¿ì
NoSuchAlgorithmException
- ÁöÁ¤µÈ ÇÁ·Î¹ÙÀÌ´õ·Î ÁöÁ¤µÈ ¾Ë°í¸®ÁòÀÌ ¾ø´Â °æ¿ì
IllegalArgumentException
- provider
°¡ nullÀÎ °æ¿ìpublic final Provider getProvider()
KeyAgreement
°´Ã¼ÀÇ ÇÁ·Î¹ÙÀÌ´õ¸¦ ¸®ÅÏÇÕ´Ï´Ù.
KeyAgreement
°´Ã¼ÀÇ ÇÁ·Î¹ÙÀÌ´õpublic final void init(Key key) throws InvalidKeyException
ÀÌ Å° ÇÕÀǰ¡ ³¼ö ¹ÙÀÌÆ®¸¦ ÇÊ¿ä·Î ÇÏ´Â °æ¿ì´Â ÀνºÅç µÇ°í ÀÖ´Â ÇÁ·Î¹ÙÀÌ´õ °¡¿îµ¥, °¡Àå ¿ì¼± ¼øÀ§ÀÇ ³ôÀº ÇÁ·Î¹ÙÀÌ´õ
±¸ÇöÀ» ³¼öÀÇ ¹ß»ý¿øÀ¸·Î¼ »ç¿ëÇØ ³¼ö ¹ÙÀÌÆ®¸¦ ÃëµæÇÕ´Ï´Ù. SecureRandom
±¸ÇöÀ» Á¦°øÇÏ´Â ÇÁ·Î¹ÙÀÌ´õ°¡ ÀνºÅçµÇ¾î ÀÖÁö ¾ÊÀº °æ¿ì´Â ½Ã½ºÅÛÀÌ Á¦°øÇÏ´Â ³¼öÀÇ ¹ß»ý¿øÀÌ »ç¿ëµË´Ï´Ù.
SecureRandom
key
- ´ç»çÀÚÀÇ ºñ°ø°³ Á¤º¸. ¿¹¸¦ µé¾î
Diffie-Hellman
Ű ÇÕÀÇÀÇ °æ¿ì´Â ´ç»çÀÚ ÀÚ½ÅÀÇ Diffie-Hellman ºñ°ø°³Å°
InvalidKeyException
- ÁöÁ¤µÈ ۰¡ ÀÌ Å° ÇÕÀÇ¿¡ ºÎÀûÀýÇÑ °æ¿ì. ¿¹¸¦ µé¾î
ÇüŰ¡ À߸øµÇ¾î ÀÖ´Â °æ¿ì, ¶Ç´Â ¾Ë°í¸®ÁòÀÇ ÇüÅ¿¡ ȣȯ¼ºÀÌ ¾ø´Â °æ¿ìpublic final void init(Key key, SecureRandom random) throws InvalidKeyException
Ű ÇÕÀÇ ¾Ë°í¸®ÁòÀÌ ³¼ö ¹ÙÀÌÆ®¸¦ ÇÊ¿ä·Î ÇÏ´Â °æ¿ì´Â ÁöÁ¤µÈ ³¼öÀÇ ¹ß»ý¿ø random
·Î
ºÎÅÍ ÃëµæÇÕ´Ï´Ù. ´Ù¸¸, ±âº»ÀÌ µÇ´Â ¾Ë°í¸®Áò ±¸ÇöÀÌ ³¼ö ¹ÙÀÌÆ®¸¦ ÇÊ¿ä·Î ÇÏÁö ¾Ê´Â °æ¿ì, random
´Â ¹«½ÃµË´Ï´Ù.
key
- ´ç»çÀÚÀÇ ºñ°ø°³ Á¤º¸. ¿¹¸¦ µé¾î
Diffie-Hellman
Ű ÇÕÀÇÀÇ °æ¿ì´Â ´ç»çÀÚ ÀÚ½ÅÀÇ Diffie-Hellman ºñ°ø°³Å°random
- ³¼öÀÇ ¼Ò½º
InvalidKeyException
- ÁöÁ¤µÈ ۰¡ ÀÌ Å° ÇÕÀÇ¿¡ ºÎÀûÀýÇÑ °æ¿ì. ¿¹¸¦ µé¾î
ÇüŰ¡ À߸øµÇ¾î ÀÖ´Â °æ¿ì, ¶Ç´Â ¾Ë°í¸®ÁòÀÇ ÇüÅ¿¡ ȣȯ¼ºÀÌ ¾ø´Â °æ¿ìpublic final void init(Key key, AlgorithmParameterSpec params) throws InvalidKeyException, InvalidAlgorithmParameterException
ÀÌ Å° ÇÕÀǰ¡ ³¼ö ¹ÙÀÌÆ®¸¦ ÇÊ¿ä·Î ÇÏ´Â °æ¿ì´Â ÀνºÅç µÇ°í ÀÖ´Â ÇÁ·Î¹ÙÀÌ´õ °¡¿îµ¥, °¡Àå ¿ì¼± ¼øÀ§ÀÇ ³ôÀº ÇÁ·Î¹ÙÀÌ´õ
±¸ÇöÀ» ³¼öÀÇ ¹ß»ý¿øÀ¸·Î¼ »ç¿ëÇØ ³¼ö ¹ÙÀÌÆ®¸¦ ÃëµæÇÕ´Ï´Ù. SecureRandom
±¸ÇöÀ» Á¦°øÇÏ´Â ÇÁ·Î¹ÙÀÌ´õ°¡ ÀνºÅçµÇ¾î ÀÖÁö ¾ÊÀº °æ¿ì´Â ½Ã½ºÅÛÀÌ Á¦°øÇÏ´Â ³¼öÀÇ ¹ß»ý¿øÀÌ »ç¿ëµË´Ï´Ù.
SecureRandom
key
- ´ç»çÀÚÀÇ ºñ°ø°³ Á¤º¸. ¿¹¸¦ µé¾î
Diffie-Hellman
Ű ÇÕÀÇÀÇ °æ¿ì´Â ´ç»çÀÚ ÀÚ½ÅÀÇ Diffie-Hellman ºñ°ø°³Å°params
- Ű ÇÕÀÇ ÆÄ¶ó¹ÌÅÍ
InvalidKeyException
- ÁöÁ¤µÈ ۰¡ ÀÌ Å° ÇÕÀÇ¿¡ ºÎÀûÀýÇÑ °æ¿ì. ¿¹¸¦ µé¾î
ÇüŰ¡ À߸øµÇ¾î ÀÖ´Â °æ¿ì, ¶Ç´Â ¾Ë°í¸®ÁòÀÇ ÇüÅ¿¡ ȣȯ¼ºÀÌ ¾ø´Â °æ¿ì
InvalidAlgorithmParameterException
- ÁöÁ¤µÈ ÆÄ¶ó¹ÌÅͰ¡ ÀÌ Å° ÇÕÀÇ¿¡ ºÎÀûÀýÇÑ °æ¿ìpublic final void init(Key key, AlgorithmParameterSpec params, SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException
key
- ´ç»çÀÚÀÇ ºñ°ø°³ Á¤º¸. ¿¹¸¦ µé¾î
Diffie-Hellman
Ű ÇÕÀÇÀÇ °æ¿ì´Â ´ç»çÀÚ ÀÚ½ÅÀÇ Diffie-Hellman ºñ°ø°³Å°params
- Ű ÇÕÀÇ ÆÄ¶ó¹ÌÅÍrandom
- ³¼öÀÇ ¼Ò½º
InvalidKeyException
- ÁöÁ¤µÈ ۰¡ ÀÌ Å° ÇÕÀÇ¿¡ ºÎÀûÀýÇÑ °æ¿ì. ¿¹¸¦ µé¾î
ÇüŰ¡ À߸øµÇ¾î ÀÖ´Â °æ¿ì, ¶Ç´Â ¾Ë°í¸®ÁòÀÇ ÇüÅ¿¡ ȣȯ¼ºÀÌ ¾ø´Â °æ¿ì
InvalidAlgorithmParameterException
- ÁöÁ¤µÈ ÆÄ¶ó¹ÌÅͰ¡ ÀÌ Å° ÇÕÀÇ¿¡ ºÎÀûÀýÇÑ °æ¿ìpublic final Key doPhase(Key key, boolean lastPhase) throws InvalidKeyException, IllegalStateException
key
- ÀÌ ´Ü°èÀÇ Å°. ¿¹¸¦ µé¾î
2 ´ç»çÀÚ »çÀÌÀÇ Diffie-HellmanÀÎ °æ¿ì´Â »ó´ëÀÇ Diffie-Hellman °ø°³Å°lastPhase
- À̰ÍÀÌ ÀÌ Å° ÇÕÀÇÀÇ ¸¶Áö¸· ´Ü°èÀΰ¡ ¾î¶²°¡¸¦ ³ªÅ¸³»´Â Ç÷¡±×
InvalidKeyException
- ÁöÁ¤µÈ ۰¡ ÀÌ ´Ü°è¿¡ ºÎÀûÀýÇÑ °æ¿ì
IllegalStateException
- ÀÌ Å° ÇÕÀǰ¡ ÃʱâȵǾî ÀÖÁö ¾ÊÀº °æ¿ìpublic final byte[] generateSecret() throws IllegalStateException
ÀÌ ¸Þ¼µå´Â ÀÌ KeyAgreement
°´Ã¼¸¦ ¸®¼Â ÇϹǷΠ°Ô´Ù°¡ ´Ù¸¥ Ű ÇÕÀÇ¿¡ Àç»ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù. ÀÌ Å° ÇÕÀǰ¡ init
¸Þ¼µåÀÇ 1°³
·Î ÀçÃʱâȵÇÁö ¾Ê´Â °æ¿ì, ±× ÈÄÀÇ Å° ÇÕÀÇ¿¡¼´Â °°Àº ºñ°ø°³ Á¤º¸¿Í ¾Ë°í¸®Áò ÆÄ¶ó¹ÌÅͰ¡ »ç¿ëµË´Ï´Ù.
IllegalStateException
- ÀÌ Å° ÇÕÀǰ¡ ¾ÆÁ÷ ¿Ï·áÇϰí ÀÖÁö ¾Ê´Â °æ¿ìpublic final int generateSecret(byte[] sharedSecret, int offset) throws IllegalStateException, ShortBufferException
offset
·Î
ºÎÅÍ ½ÃÀ۵Ǵ sharedSecret
¹öÆÛ³»¿¡ Æ÷ÇÔÇÕ´Ï´Ù.
sharedSecret
¹öÆÛ°¡ ³Ê¹« ÀÛ¾Æ °á°ú¸¦ º¸°ü À¯ÁöÇÒ ¼ö ¾ø´Â °æ¿ì´Â ShortBufferException
°¡ ¹ß»ý µË´Ï´Ù. ÀÌ °æ¿ì
º¸´Ù Å« Ãâ·Â ¹öÆÛ¸¦ »ç¿ëÇØ ÀÌ È£ÃâÀ» ¹Ýº¹ÇÕ´Ï´Ù.
ÀÌ ¸Þ¼µå´Â ÀÌ KeyAgreement
°´Ã¼¸¦ ¸®¼Â ÇϹǷΠ°Ô´Ù°¡ ´Ù¸¥ Ű ÇÕÀÇ¿¡ Àç»ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù. ÀÌ Å° ÇÕÀǰ¡ init
¸Þ¼µåÀÇ 1°³
·Î ÀçÃʱâȵÇÁö ¾Ê´Â °æ¿ì, ±× ÈÄÀÇ Å° ÇÕÀÇ¿¡¼´Â °°Àº ºñ°ø°³ Á¤º¸¿Í ¾Ë°í¸®Áò ÆÄ¶ó¹ÌÅͰ¡ »ç¿ëµË´Ï´Ù.
sharedSecret
- °øÀ¯ÀÇ ºñ¹Ð Á¤º¸¸¦ Æ÷ÇÔÇÏ´Â ¹öÆÛoffset
- °øÀ¯ÀÇ ºñ¹Ð Á¤º¸°¡ Æ÷ÇԵǴ sharedSecret
³»ÀÇ ¿ÀÇÁ¼Â(offset)
sharedSecret
¿¡ Æ÷ÇÔµÈ ¹ÙÀÌÆ®¼ö
IllegalStateException
- ÀÌ Å° ÇÕÀǰ¡ ¾ÆÁ÷ ¿Ï·áÇϰí ÀÖÁö ¾Ê´Â °æ¿ì
ShortBufferException
- ÁöÁ¤µÈ Ãâ·Â ¹öÆÛ°¡ ³Ê¹« ÀÛ¾Æ ºñ¹Ð Á¤º¸¸¦ º¸°ü À¯ÁöÇÒ ¼ö ¾ø´Â °æ¿ìpublic final SecretKey generateSecret(String algorithm) throws IllegalStateException, NoSuchAlgorithmException, InvalidKeyException
SecretKey
°´Ã¼·Î¼ ¸®ÅÏÇÕ´Ï´Ù.
ÀÌ ¸Þ¼µå´Â ÀÌ KeyAgreement
°´Ã¼¸¦ ¸®¼Â ÇϹǷΠ°Ô´Ù°¡ ´Ù¸¥ Ű ÇÕÀÇ¿¡ Àç»ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù. ÀÌ Å° ÇÕÀǰ¡ init
¸Þ¼µåÀÇ 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 µµ ÂüÁ¶ÇϽʽÿÀ.