본문 바로가기
728x90
반응형

분류 전체보기59

Springboot PasswordEncoder 등록 설정 build.gradle ... dependencies { implementation 'org.springframework.boot:spring-boot-starter-security' implementation 'org.springframework.boot:spring-boot-starter-web' } WebSecurityBeanFactory.java import com.google.common.base.Charsets; import com.google.common.hash.Hashing; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Con.. 2021. 4. 5.
SHA1 vs SHA2 차이점 SHA-1 SHA-1은 160자로 hash한다 SHA-2 SHA-2는 보통 256자로 해쉬한다. (SHA-256) SHA-224, SHA-384, SHA-512 또한 SHA-2이다. www.thesslstore.com/blog/difference-sha-1-sha-2-sha-256-hash-algorithms/ What is the Difference Between SHA-1, SHA-2 and SHA-256? An in-depth look at hashing algorithms, how they relate to SSL Certificates and what it means when we discuss SHA-1, SHA-2 and SHA-256. www.thesslstore.com 2021. 4. 5.
AES256/ base64 암호화 with java build.gradle dependencies { ... implementation 'org.springframework.boot:spring-boot-starter-security' } AES_Encryption.java import java.io.ByteArrayOutputStream; import java.security.SecureRandom; import java.security.spec.AlgorithmParameterSpec; import java.util.Arrays; import java.util.Base64; import javax.crypto.Cipher; import javax.crypto.SecretKey; import javax.crypto.spec.IvParameterSpec;.. 2021. 4. 2.
Spring security 기본 설정 - 로그인 설정 build.gradle ... dependencies { implementation 'org.springframework.boot:spring-boot-starter-security' implementation 'org.springframework.boot:spring-boot-starter-web' compileOnly 'org.projectlombok:lombok' annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor' }코드 WebSecurityConfig.java import com.fasterxml.jackson.databind.ObjectM.. 2021. 4. 1.
728x90