Bcrypt는 단방향 암호화 알고리즘이기 때문에 복호화가 불가능하다.
따라서 암호화 된 hash 값과 hash 값 끼리는 검증이 불가능하다.
오로지 평문과 hash 값만 비교 가능하다.
Bcrypt는 단방향 암호화 알고리즘이기 때문에 복호화가 불가능하다.
따라서 암호화 된 hash 값과 hash 값 끼리는 검증이 불가능하다.
오로지 평문과 hash 값만 비교 가능하다.
1. .proto 파일에 "google/protobuf/timestamp.proto" 를 import 한다.
import "google/protobuf/timestamp.proto";
2. 파라미터 타입을 아래와같이 지정한다.
message TestRequest {
google.protobuf.Timestamp dt = 1;
}
3. C# 클라이언트에서는 아래와같이 파라미터를 가공한다.
var request = new TestRequest() {
dt = Timestamp.FromDateTime(DateTime.Now)
}
4. gRPC 서버에서는 파라미터를 아래와같이 가공한다.
DateTime dt2 = request.dt.ToDateTime();| C# RSA 키 생성 예제 (0) | 2023.09.14 |
|---|---|
| C# Convert TimeSpan to DateTime (1) | 2023.09.14 |
DateTime을 Time Span으로 바꾸는 방법은 아래와 같다.
DateTime dt = DateTime.Now;
TimeSpan span = TimeSpan.FromTicks(dt.Ticks);
Console.WriteLine(span);
반대로, TimeSpan 값을 DateTime 으로 바꾸는 방법은 아래 두가지 방법이 있다.
DateTime dt2 = new DateTime() + span;
DateTime dt3 = new DateTime(span.Ticks);
Console.WriteLine(dt2);
Console.WriteLine(dt3);| C# RSA 키 생성 예제 (0) | 2023.09.14 |
|---|---|
| gRPC DateTime C# 예제 (1) | 2023.09.14 |
Owls are one of the only birds who can see the color blue!
올빼미는 유일하게 파란색을 볼 수 있는 색을 볼 수 있는 새 중 하나입니다.
- Owls: 올빼미
- one: 하나의
- only: 유일한
- birds: 새들
- who: 누구
- can: 할 수 있다
- see: 보다
- color: 색
- blue: 파란색

If you went out into space, you would explode before you suffocated because there's no air pressure.
우주로 나가면 질식하기 전에 폭발할 것이다. 왜냐하면 공기압이 없기 때문이다.
- explode : 폭발하다 (동사)
- suffocate : 질식하다 (동사)
- air pressure : 대기압 (명사)

The longest one-syllable word in the English language is "screeched."
영어에서 가장 긴 한 음절 단어는 "screeched"입니다.
- screeched: 비명을 지르다 (동사)

ubuntu 20.04를 사용하면서 처음 겪는 현상이 있었다.
마우스가 커서를 움직이는 것은 가능하나 (좌/우)클릭만 안되는 것이었다.
이문제를 해결하기 위해 구글링을 해보다가 다음과 같은 명령어를 통해 해결할 수 있었다.
sudo udevadm trigger
| [GO] hash/maphash: malformed module path "hash/maphash": missing dot in first… (0) | 2022.08.11 |
|---|---|
| [docker] E: Package 'locales' has no installation candidate (1) | 2022.08.08 |
Reindeer like to eat bananas.
순록은 바나나를 먹는다.
- Reindeer: 순록 (명사)
- like: 좋아하다 (동사)
- to eat: 먹다 (동사)
- bananas: 바나나 (명사)

간단한 파일 탐색을 위한 스크립트를 작성해보았다.
막강한 명령어인 find를 기반으로 동작하고 몇가지 옵션을 간편하게 적용할 수 있도록 해둔 것으로 이해하면 좋을 것 같다.
사용은 아래와 같다. (script의 이름은 대충 finder라고 지어뒀으니 마음에 드는 이름으로 바꿔서 쓰시길)
./finder.sh 경로이름 -i include -i want -e exclude -e trash -f json -h -o result.txt
여러가지 옵션을 지원하는데 간단하게 설명해보자면
#!/bin/bash
usage() {
echo "Usage: $0 path [-i include]... [-e exclude]... [-o output] [-h] [-f format]"
echo "Options:"
echo " path The directory path to search in."
echo " -i Include keyword in path (can be used multiple times)"
echo " -e Exclude keyword from path (can be used multiple times)"
echo " -o Output file path"
echo " -h Search hidden files"
echo " -f Output format: json or plain (default: plain)"
exit 1
}
declare -a includes
declare -a excludes
output=""
hidden="false"
format="plain"
# Capture the search path first
path="$1"
shift
# If no path or it starts with '-', show usage
if [ -z "$path" ] || [[ "$path" == -* ]]; then
usage
fi
while getopts "i:e:o:hf:" opt; do
case $opt in
i) includes+=("$OPTARG") ;;
e) excludes+=("$OPTARG") ;;
o) output="$OPTARG" ;;
h) hidden="true" ;;
f) format="$OPTARG" ;;
\?) usage ;;
esac
done
# Start constructing the find command
cmd="find '$path'"
# Handle hidden files
if [ "$hidden" != "true" ]; then
cmd="$cmd ! -path '*/.*'"
fi
# Handle include keywords
if [ "${#includes[@]}" -gt 0 ]; then
for keyword in "${includes[@]}"; do
cmd="$cmd -path '*$keyword*'"
done
fi
# Handle exclude keywords
for keyword in "${excludes[@]}"; do
cmd="$cmd ! -path '*$keyword*'"
done
# Add the print command
cmd="$cmd -print"
# Handle format
case "$format" in
json)
cmd="$cmd | sed 's/^/\"/' | sed 's/$/\",/' | (echo '['; cat; echo ']')"
;;
plain)
;; # Nothing to do here, as the default is to just print
*)
;; # Default case: just print
esac
# Handle output
if [ -n "$output" ]; then
cmd="$cmd > '$output'"
fi
eval "$cmd"
| [bash] 파일 크기 순으로 검색 (0) | 2023.12.12 |
|---|---|
| [bash] 명령어 반복 (0) | 2023.09.19 |
| [bash] bash를 이용한 json 파일 파싱 (0) | 2022.08.11 |
| [bash] 특정 길이의 무작위 문자열 획득 (0) | 2022.08.11 |
| [bash] 프로세스 존재 여부 확인 (0) | 2022.08.11 |
In the last 3,500 years, there have been approximately 230 years of peace throughout the civilized world.
지난 3,500년 동안 문명 세계 전체에서 약 230년 동안 평화가 있었습니다.
- last: 지난, 최근의 (형용사)
- approximately: 약 (부사)
- peace: 평화 (명사)
- throughout: ~동안에, ~전체에 걸쳐 (전치사)
- civilized: 문명적인, 교양 있는 (형용사)
- world: 세계 (명사)
