예제 #1
0
        public void ExportPublicKeyToPkcsFormattedString_Success()
        {
            var keyString = PublicKeyStartString + PublicBase64EncodedKey + PublicKeyEndString;

            using var publicKey = new StringReader(keyString);
            var rsa = RsaHelper.LoadKeys(publicKey);

            RsaHelper.ExportPublicKeyToPkcsFormattedString(rsa).Should().Be(keyString);
        }
예제 #2
0
 private KeyValuePair <string, object> GetRequester()
 {
     return(new("requester", new
     {
         did = _ownIdCoreConfiguration.DID,
         pubKey = RsaHelper.ExportPublicKeyToPkcsFormattedString(_ownIdCoreConfiguration
                                                                 .JwtSignCredentials),
         name = Localize(_ownIdCoreConfiguration.Name),
         icon = _ownIdCoreConfiguration.Icon,
         description = Localize(_ownIdCoreConfiguration.Description),
         overwriteFields = _ownIdCoreConfiguration.OverwriteFields
     }));
 }