【发布时间】:2018-02-02 00:33:47
【问题描述】:
我发现了一个看起来非常简洁的小包,可以让您使用 dapper + identity core 2.0。但是,由于我对核心开发非常陌生,所以我对某些事情有些困惑,我不知道如何解决它。有问题的包是这样的:https://github.com/grandchamp/Identity.Dapper
软件包要求我设置一些次要配置,然后一切正常。以下是说明:
//To configure the DBMS connection, you can add a DapperIdentity and a DapperIdentityCryptography section to your configuration file like this:
"DapperIdentity": {
"ConnectionString": "Connection string of your database",
"Username": "user",
"Password": "123"
},
"DapperIdentityCryptography": {
"Key": "base64 32 bits key",
"IV": "base64 16 bits key"
}
真正让我困惑的是DapperIdentityCryptography 部分。是希望我保持原样,还是希望我提供某种加密字符串。我只是不明白。我感到困惑的另一部分是将连接字符串保留为可读格式,我觉得我应该对其进行加密,将其放入 ConnectionString 部分,然后提供解密它的密钥?
【问题讨论】:
标签: c# encryption asp.net-core asp.net-identity dapper