資源簡介
經典哈希算法,用MATLAB實現
代碼片段和文件信息
function?h?=?hash(inpmeth)
%?HASH?-?Convert?an?input?variable?into?a?message?digest?using?any?of
%????????several?common?hash?algorithms
%
%?USAGE:?h?=?hash(inp‘meth‘)
%
%?inp??=?input?variable?of?any?of?the?following?classes:
%????????char?uint8?logical?double?single?int8?uint8
%????????int16?uint16?int32?uint32?int64?uint64
%?h????=?hash?digest?output?in?hexadecimal?notation
%?meth?=?hash?algorithm?which?is?one?of?the?following:
%????????MD2?MD5?SHA-1?SHA-256?SHA-384?or?SHA-512?
%
%?NOTES:?(1)?If?the?input?is?a?string?or?uint8?variable?it?is?hashed
%????????????as?usual?for?a?byte?stream.?Other?classes?are?converted?into
%????????????their?byte-stream?values.?In?other?words?the?hash?of?the
%????????????following?will?be?identical:
%???????????????
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????2721??2015-07-20?11:13??HASH.m
-----------?---------??----------?-----??----
?????????????????2721????????????????????1
- 上一篇:高魯棒性的自適應圖像加密算法
- 下一篇:SLMphase 純相位空間光調制器相息圖
評論
共有 條評論