문서의 선택한 두 판 사이의 차이를 보여줍니다.
| 다음 판 | 이전 판 | ||
|
javascript:crypt [2012/12/15 15:51] kwon37xi 새로 만듦 |
javascript:crypt [2018/04/24 13:23] (현재) kwon37xi |
||
|---|---|---|---|
| 줄 2: | 줄 2: | ||
| * [[http:// | * [[http:// | ||
| * [[http:// | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * 이 라이브러리로 RSA 암호화를 할 때 값이 '' | ||
| + | // Java에서 인코딩된 문자열을 Byte[]로 바꿀때 맨 앞에 0 이 있으면 삭제하기 | ||
| + | private byte[] getEncryptedBytes(String encryptedString) { | ||
| + | byte[] bytes = new BigInteger(encryptedString, | ||
| + | // javascript RSA 라이브러리가 맨 앞에 \0을 붙이는 현상이 있어서 처리하고 있음. | ||
| + | if (bytes[0] == 0) { | ||
| + | return ArrayUtils.subarray(bytes, | ||
| + | } | ||
| + | return bytes; | ||
| + | } | ||
| + | </ | ||
| * [[http:// | * [[http:// | ||
| * [[http:// | * [[http:// | ||
| * [[http:// | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[java: | ||