public void ResolveFromTextualRepresentation()
 {
     Assert.IsInstanceOf <OwnerId>(InterlockId.Resolve("Owner!AAA#SHA1"));
     Assert.IsInstanceOf <KeyId>(InterlockId.Resolve("Key!AAA#SHA1"));
 }
Esempio n. 2
0
 internal static BaseKeyId Sender(this IEnumerable <Claim> claims)
 => BuildFrom(ClaimValue(claims, _senderIdClaimType), textual => InterlockId.Resolve(textual) as BaseKeyId);
 public void ResolveFromStream()
 {
     Assert.IsInstanceOf <OwnerId>(InterlockId.Resolve(ToStream(new byte[] { 43, 5, 1, 0, 0, 0, 0 })));
     Assert.IsInstanceOf <KeyId>(InterlockId.Resolve(ToStream(new byte[] { 43, 5, 4, 0, 0, 0, 0 })));
 }
Esempio n. 4
0
 public static Stream EncodeInterlockId(this Stream s, InterlockId value) => s.EncodeTag(value);