当前位置: 首页 > news >正文

计算图像哈希SHA-512

1、MATLAB实现

计算图像哈希值SHA-512,在文献[1]提到的算法如下:

% Example Code:    Create an MD5 crypto-hash of an arbitrary string, "str"
% Main class of interest:    System.Security.Cryptography.HashAlgorithm% Example String to hash with MD5
% str = 'hello there big world';
% str= ' i love china';
myx=imread('lena.jpg');% Image_As_A_vector = reshape(typecast(myx, 'uint8'), 1, []));
array_in=char(strjoin(string(reshape(myx,1,[]))));
str=array_in;
% Create any specified cryptographic hasher. 
% Supported string args include 'MD5', 'SHA1', 'SHA256', 'SHA384', 'SHA512'.
% That's what I could figure out by random guessing...  'SHA3' didn't work.
% hasher = System.Security.Cryptography.HashAlgorithm.Create('MD5');
hasher = System.Security.Cryptography.HashAlgorithm.Create('SHA512');
% Convert the char
http://www.lryc.cn/news/120786.html

相关文章:

  • Android之消除APP图标的白色边框
  • java线程的优先级、守护线程的概念
  • asp.net core 6.0 efcore +sqlserver增删改查的demo
  • HC32L110B6芯片测试
  • 关于我乱删注册表导致电脑没有声音这件事
  • Linux 命令 su 和 sudo 的区别
  • 微信小程序:Mobx的使用指南
  • 【Spring Boot】Spring Boot项目的创建和文件配置
  • Spring Cloud 智慧工地源码(PC端+移动端)项目平台、监管平台、大数据平台
  • 通达OA SQL注入漏洞【CVE-2023-4165】
  • centos7 安装 docker 不能看菜鸟教程的 docker 安装,有坑
  • ♥ vue中$nextTick()
  • 小程序裂变怎么做?小程序裂变机制有哪些?
  • Openlayers实战:使几何图形适配窗口
  • 活动发布会邀请媒体6步走
  • W6100-EVB-PICO作为TCP Client 进行数据回环测试(五)
  • emqx-5.1.4开源版使用记录
  • Java 线程池的原理与实现
  • 【idea】点击idea启动没反应
  • C# Atrribute和反射的简单例子
  • ASP.NET Core - 缓存之分布式缓存
  • 代理模式(C++)
  • C# 有效的字母异位词
  • R语言安装包Seurat
  • vue2中使用mixins(混入)和vue3中使用composable
  • 通过OpenTelemetry上报Python-flask应用数据(阿里云)
  • 使用node搭建服务器,前端自己写接口,将vue或react打包后生成的dist目录在本地运行
  • 一篇文章搞懂如何使用JDBC操作数据库,还有JDBC进阶操作
  • 9.3.2.1网络原理(UDP)
  • 21、stm32使用LTDC驱动LCD