-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathAlgoScryptModified.cs
More file actions
53 lines (45 loc) · 1.46 KB
/
AlgoScryptModified.cs
File metadata and controls
53 lines (45 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
using System;
using System.Linq;
using System.Collections.Generic;
using System.Text.Json;
using System.Text.Json.Serialization;
using Appwrite.Enums;
using Appwrite.Extensions;
namespace Appwrite.Models
{
public class AlgoScryptModified
{
[JsonPropertyName("type")]
public string Type { get; private set; }
[JsonPropertyName("salt")]
public string Salt { get; private set; }
[JsonPropertyName("saltSeparator")]
public string SaltSeparator { get; private set; }
[JsonPropertyName("signerKey")]
public string SignerKey { get; private set; }
public AlgoScryptModified(
string type,
string salt,
string saltSeparator,
string signerKey
) {
Type = type;
Salt = salt;
SaltSeparator = saltSeparator;
SignerKey = signerKey;
}
public static AlgoScryptModified From(Dictionary<string, object> map) => new AlgoScryptModified(
type: map["type"].ToString(),
salt: map["salt"].ToString(),
saltSeparator: map["saltSeparator"].ToString(),
signerKey: map["signerKey"].ToString()
);
public Dictionary<string, object?> ToMap() => new Dictionary<string, object?>()
{
{ "type", Type },
{ "salt", Salt },
{ "saltSeparator", SaltSeparator },
{ "signerKey", SignerKey }
};
}
}