반응형

해시(Hash), 암호화(Encryption)

해시는 단방향 암호화로 복호화가 불가능하다. 주로 패스워드에 사용한다.

암호화는 양방향 암호화 즉 암호화한 데이터를 복호화하여 평문으로 돌릴 수 있다. 주로 통신용으로 사용한다.

- 대칭키

- 비대칭키

반응형
반응형

보안상 사용자와 client의 상호작용이 없으면 적용되지 않음

function noBack() {
    history.pushState('preventLocation', document.title, '#');

    if (typeof window.addEventListener != 'undefined') {
	    window.addEventListener('popstate', clearHistory);
    } else if (typeof window.attachEvent != 'undefined') {
	    window.attachEvent('popstate', clearHistory);
    } else {
	    window.onpopstate = clearHistory;
    }
};

function clearHistory() {
    history.pushState('popstateFunction', document.title, '#');
};
반응형
반응형
반응형
반응형

@JsonIgnore: Response에 해당 필드가 제외된다
@JsonProperty: Response에 해당 속성의 이름이 변경된다

@Getter
@Setter
public class ResponseModel {

  private String data;
  private boolean result;
  @JsonProperty("errorMessage")
  private String errorMsg;
  @JsonIgnore
  private Integer errorCode;

}

 

RESPONSE

{
  "data":"response data------",
  "result":false,
  "errorMessage":"errorrrrr"
}

 

반응형
반응형
String contextPath = ServletUriComponentsBuilder.fromCurrentContextPath().toUriString();
반응형
반응형
반응형

+ Recent posts