1.MimeMapper增加mime类型与扩展名的映射关系

2.Dictionary增加扩展方法
This commit is contained in:
懒得勤快
2020-08-19 13:42:19 +08:00
parent 624d22afb4
commit af7773dee9
9 changed files with 384 additions and 30 deletions
+6 -1
View File
@@ -1,4 +1,6 @@
using Masuit.Tools.Security;
using Masuit.Tools;
using Masuit.Tools.AspNetCore.Mime;
using Masuit.Tools.Security;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using System;
@@ -10,6 +12,9 @@ namespace NetCoreTest
{
public static void Main(string[] args)
{
MimeMapper.ExtTypes.AddOrUpdate(MimeMapper.MimeTypes);
var type = MimeMapper.ExtTypes.AsConcurrentDictionary()[".jpg"];
Console.WriteLine(type);
var rsaKey = RsaCrypt.GenerateRsaKeys(RsaKeyType.PKCS8, 2048);
Console.WriteLine(rsaKey.PrivateKey);
Console.WriteLine(rsaKey.PublicKey);