Conversation
Closed
1 task
pparkjs
reviewed
Jan 28, 2025
Collaborator
pparkjs
left a comment
There was a problem hiding this comment.
암호화 구현하느라 정말 고생하셨어요 공부 많이 하셨을 거 같아요!!
제가 코맨트 남겨 드린거 어떨지 고민 한 번 하는게 좋을 거 같고
AES 암호화는 코드로 봤을때 사용은 안하던데 일단 만들어 둔거라고 생각하면 되는거죠!?
Comment on lines
+32
to
+37
|
|
||
| // 암호화 적용으로 인해, 임시로 작성해둔 코드입니다. | ||
| // 모든 어드민이 암호를 변경하면 if 조건식만 제거합니다. | ||
| if (!password.equals("12345")) { | ||
| admin.validatePassword(sha256Cipher.encrypt(password)); // 해당 라인은 제거하지 않습니다. | ||
| } |
| @Component | ||
| public class Aes256Cipher { | ||
|
|
||
| private static final String ALGORITHM = "AES/CBC/PKCS5Padding"; |
Collaborator
There was a problem hiding this comment.
그런데 이런 값을 프로필에 안넣고 노출시켜도 될까요??
Collaborator
Author
There was a problem hiding this comment.
음 애초에 클래스 이름부터 암호화 알고리즘을 나타내기 때문에, 숨길 필요가 있을까 싶긴 합니다.
Collaborator
Author
There was a problem hiding this comment.
아 추가로, AES 암호화는 일반 사용자 대상으로 사용할 예정입니다!
| } | ||
|
|
||
| private SecretKey createSecretKey() throws NoSuchAlgorithmException, InvalidKeySpecException { | ||
| SecretKeyFactory secretKeyFactory = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA256"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
어드민 계정의 비밀번호를 수정하는 API를 구현했습니다.
수정하려는 새로운 비밀번호에 SHA-256 암호화를 적용했습니다.
Relation Issues