2using System.Collections.Generic;
3using System.Threading.Tasks;
26 : base(
"Crypto/GetPublicKey",
27 new KeyValuePair<Type,
Expression>(typeof(Dictionary<string, object>), new
Expression(jsonPattern)),
52 if (Parameters.TryGetValue(
"PKeyId", out
IElement E) && !(E is
null) && E.AssociatedObjectValue is
string s)
55 if (
string.IsNullOrEmpty(KeyId))
61 Namespace = Endpoint.Namespace;
73 PublicKey = AgentKey.PublicKey ??
new byte[0];
79 {
"key", Convert.ToBase64String(PublicKey) },
80 {
"Algorithm",
new Dictionary<string, object>()
82 {
"localName", Endpoint.LocalName },
83 {
"namespace", Namespace },
84 {
"securityStrength", Endpoint.SecurityStrength },
85 {
"safe", Endpoint.Safe },
86 {
"slow", Endpoint.Slow },
87 {
"score", Endpoint.Score }
A Named dictionary is a dictionary, with a local name and a namespace. Use it to return content that ...
Static class managing loading of resources stored as embedded resources or in content files.
static string LoadResourceAsText(string ResourceName)
Loads a text resource from an embedded resource.
Represents an HTTP request.
Represets a response of an HTTP client request.
async Task Return(object Object)
Returns an object to the client. This method can only be called once per response,...
The server has not found anything matching the Request-URI. No indication is given of whether the con...
The server is currently unable to handle the request due to a temporary overloading or maintenance of...
Abstract base class for Elliptic Curve endpoints.
Static interface for database persistence. In order to work, a database provider has to be assigned t...
This filter selects objects that conform to all child-filters provided.
This filter selects objects that have a named field equal to a given value.
Class managing a script expression.
string UserName
User Name.
Abstract base class for agent resources supporting the POST method.
static AccountUser AssertUserAuthenticated(HttpRequest Request)
Makes sure the request is made by an authenticated API user.
const string AgentNamespace
https://waher.se/Schema/BrokerAgent.xsd
Contains an encrypted key for an agent.
string Namespace
Namespace of algorithm
string LocalName
Local Name of algorithm
Gets available cryptographic algorithms.
static bool TryGetAlgorithm(string LocalName, string Namespace, out EllipticCurveEndpoint Algorithm)
Tries to get an algorithm given its fully qualified name.
Gets the public key of the server.
override async Task POST(HttpRequest Request, HttpResponse Response, Dictionary< string, IElement > Parameters)
Executes the POST method on the resource.
GetPublicKey()
Gets the public key of the server.
static LedgerConfiguration Instance
Current instance of configuration.
string SignatureAlgorithm
Name of signature algorithm.
byte[] PublicKey
Public key used to validate signatures.
Basic interface for all types of elements.