小编Cas*_*ock的帖子

OpenSSL passwd哈希不一致

我正在尝试使用OpenSSL passwd命令对输入的密码进行哈希处理,并将其与存储的哈希值进行比较,但哈希函数不一致.第一次生成的哈希与我比较输入时生成的哈希值不同.请注意每次执行哈希时的3个不同结果:

caseys-air:~ Casey$ openssl passwd -1 MySecret
$1$AlHYrEQp$.c7UTqHiReGXfmNtXOY/T0
caseys-air:~ Casey$ openssl passwd -1 MySecret
$1$6BPglDOg$8KHb5e7ZryYPfYP0Zm8Ra/
caseys-air:~ Casey$ openssl passwd -1 MySecret
$1$vmQtjpWw$yIi6sZt.3XAP7W3e7hBG11
Run Code Online (Sandbox Code Playgroud)

这里发生了什么?系统时间是否用于创建哈希?如何获得一致的哈希值?

hash openssl

8
推荐指数
1
解决办法
3318
查看次数

增加intellij中最近文件的数量

有没有办法增加 Intellij 的“最近使用的文件”窗口中显示的文件数量?(查看 -> 最近的文件 \xe2\x8c\x98E)

\n

intellij-idea

6
推荐指数
1
解决办法
1251
查看次数

当链接器设置为"全部链接"时,JSON反序列化失败

尝试在设备上反序列化JSON时,我收到ArgumentNullException.这是确切的错误:

反序列化错误

这是调用代码:

private TMetadata ReadObject(string path)
{
    var data = File.ReadAllText(path);
    var obj = JsonConvert.DeserializeObject(data, _settings);
    return (TMetadata) obj;
}
Run Code Online (Sandbox Code Playgroud)

我通读了这个帖子并意识到这是一个链接器问题.在构建设备时,我的项目设置为Link All,由于大小限制,将其更改为Do not Link是不可行的.

我检查了json文本并找到了它试图反序列化的类型,然后转到该类并将其标记为Preserve(AllMembers = true)].我将相同的属性添加到类中使用的任何用户定义的类.但是,我仍然得到同样的错误.我还将--linkskip = AssemblyName添加到其他mtouch参数中并且没有运气.

有人有任何提示吗?至少有什么方法可以从xamarin获得更多有用的信息吗?当异常发生时,它将我带到一个看似随机的行 - 一个不相关的类中的事件声明 - 并且单击堆栈中的方法什么都不做.我不知道"方法"参数是什么.

这是在ReadObject调用之后开始的堆栈:

Newtonsoft.Json.Utilities.ValidationUtils.ArgumentNotNull(object value, string parameterName) in 
Newtonsoft.Json.Utilities.ExpressionReflectionDelegateFactory.CreateParametrizedConstructor(System.Reflection.MethodBase method) in 
Newtonsoft.Json.Serialization.JsonArrayContract.CreateWrapper(System.Collections.Generic.Dictionary<Bluebeam.Studio.Client.SDK.Sessions.SessionMarkupId,Bluebeam.Studio.Client.SDK.Sessions.ServerState.Pending.PendingItems.PendingMarkupDto> list) in 
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewList(Newtonsoft.Json.JsonTextReader reader, Newtonsoft.Json.Serialization.JsonArrayContract contract, bool createdFromNonDefaultCreator) in 
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(Newtonsoft.Json.JsonTextReader reader, System.MonoType objectType, Newtonsoft.Json.Serialization.JsonArrayContract contract, Newtonsoft.Json.Serialization.JsonProperty member, object existingValue, string id) in 
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(Newtonsoft.Json.JsonTextReader reader, System.MonoType objectType, Newtonsoft.Json.Serialization.JsonArrayContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonObjectContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerMember, …
Run Code Online (Sandbox Code Playgroud)

.net c# serialization json xamarin

3
推荐指数
1
解决办法
652
查看次数

标签 统计

.net ×1

c# ×1

hash ×1

intellij-idea ×1

json ×1

openssl ×1

serialization ×1

xamarin ×1