Hash value.
Information that is unique to each piece of data. Digital fingerprint.
해시(Hash)값.
데이터마다 고유하게 가지고 있는 정보. 디지털 지문.
The hash value can be checked through various hash algorithms.
CRC, MD5, SHA-1, SHA-256 etc.
해시 값은 다양한 해시 알고리즘을 통해 확인할 수 있다.
CRC, MD5, SHA-1, SHA-256 등
Each hash value has a unique length according to the algorithm.
It is not related to the amount of original data.
그리고 각 해시값은 알고리즘에 따라 고유한 길이를 가진다.
원본 데이터의 분량과는 관계가 없다.
The length of the each algorithm hash value.
알고리즘별 해시값의 길이.
CRC40
$ echo 1 | cksum
4219530715
40bit = 5Bytes = 10Bytes(??)
It is 5Bytes in hexadecimal basis but 10Bytes in string basis.
16진수 기준으로는 5Bytes지만, 문자열 기준으로는 10Bytes이다.
(ASCII)character express 1Bytes per character, but hexadecimal express 0~255 value as 1Bytes.
(ASCII)문자열 기준으로는 1글자당 1Bytes지만, 16진수 기준으로는 0~255 수치를 1Bytes로 표현할 수 있기 때문.
Assuming that there is a value of FF, it is 2Bytes because it is 2 characters. However, since FF is a decimal value of 255, it can be represented as 1 byte in hexadecimal basis. That is, the length is two times different according to the standard.
FF라는 값이 있다고 가정하면, 문자열 기준으로는 2글자이기에 2Bytes다. 그러나 FF는 10진수로 255라는 값이므로 16진수 기준으로는 1Byte로 표현할 수 있다. 즉, 기준에 따라 길이가 2배 차이난다.
$ echo 1 | cksum
4219530715 → 42 19 53 07 15
40bit = 5Bytes(16진수 기준) = 10Bytes(문자열 기준)
MD5
128bit = 16Bytes = 32Bytes(문자열)
$ echo 1 | md5sum
b026324c6904b2a9cb4b88d6d61c81d1
SHA-1
160bit = 20Bytes = 40Bytes(문자열)
$ echo 1 | sha1sum
e5fa44f2b31c1fb553b6021e7360d07d5d91ff5e
SHA-256
256bit = 32Bytes = 64Bytes(문자열)
$ echo 1 | sha256sum
4355a46b19d348dc2f57c046f8ef63d4538ebb936000f3c9ee954a27460dd865
SHA-384
384bit = 48Bytes = 96Bytes(문자열)
$ echo 1 | sha384sum
d654902b550e334bb6898d5c4ab8ebe1aedc6c85368eafe28e0f89b62a74a23e1ed20abbc10c02ce321266384d444717
SHA-512
512bit = 64Bytes = 128Bytes(문자열)
$ echo 1 | sha256sum
3abb6677af34ac57c0ca5828fd94f9d886c26ce59a8ce60ecf6778079423dccff1d6f19cb655805d56098e6d38a1a710dee59523eed7511e5a9e4b8ccb3a4686