c# cmac算法_在mac上使用VS Code编写C#应用程序

Visual Studio Code是微软的跨平台的VS开发工具,依赖于dot net core的跨平台功能。

首先需要在mac上安装dot net core 开发包(包含dot net core 运行时),dot net core mac 版 官方网站:

下载并安装

这个地址是关于各种安装异常的问题的方案

这个问题可以执行这个命令解决:

ln -s /usr/local/share/dotnet/dotnet /usr/local/bin

然后又出现了dotnew new 命令异常的问题,原因是新安装的openssl没有替换掉系统自带的版本。

在终端执行这个命令可以解决:

sudo

install_name_tool -add_rpath /usr/local/opt/openssl/lib /usr/local/share/dotnet/shared/Microsoft.NETCore.App/1.0.0/System.Security.Cryptography.Native.dylib

不过要将1.0.0替换为当前安装的dotnet core版本。我这里需要替换为1.0.1

安装完成之后,打开终端,可以测试一下。

进入一个文件夹,运行一下命令:

dotnet new

dotnet restore

dotnet run

如果打印出了

Hello World!

则一切正常。

为VS Core 安装 C# Extension 插件

打开VS Core 的命令面板,输入 ext install C# 命令来出发安装C#插件请求。

C# Extension插件安装完成之后,现在可以创建并调试项目了

在资源管理器中右键,打开终端,执行命令 创建项目

dotnet new

dotnet restore

打开调试面板,调试目标选择 .Net Core Launch(Console)

点击调试按钮,提示需要配置调试信息.

在launch.json文件中,编辑Program参数来设定要调试的dll的路径。

现在可以开始调试。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
详细介绍了AES-CMAC算法的原理与实现,附有C语言写的样例程序。 以下是原文的introduction: The National Institute of Standards and Technology (NIST) has recently specified the Cipher-based Message Authentication Code(CMAC). CMAC [NIST-CMAC] is a keyed hash function that is based on a symmetric key block cipher, such as the Advanced Encryption Standard [NIST-AES]. CMAC is equivalent to the One-Key CBC MAC1 (OMAC1) submitted by Iwata and Kurosawa [OMAC1a, OMAC1b]. OMAC1 is an improvement of the eXtended Cipher Block Chaining mode (XCBC) submitted by Black and Rogaway [XCBCa, XCBCb], which itself is an improvement of the basic Cipher Block Chaining-Message Authentication Code (CBC-MAC). XCBC efficiently addresses the security deficiencies of CBC-MAC, and OMAC1 efficiently reduces the key size of XCBC. AES-CMAC provides stronger assurance of data integrity than a checksum or an error-detecting code. The verification of a checksum or an error-detecting code detects only accidental modifications of the data, while CMAC is designed to detect intentional, unauthorized modifications of the data, as well as accidental modifications. AES-CMAC achieves a security goal similar to that of HMAC [RFC-HMAC]. Since AES-CMAC is based on a symmetric key block cipher, AES, and HMAC is based on a hash function, such as SHA-1, AES-CMAC is appropriate for information systems in which AES is more readily available than a hash function. This memo specifies the authentication algorithm based on CMAC with AES-128. This new authentication algorithm is named AES-CMAC.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值