Esempio n. 1
0
 public IdentityWithGMSS(string label, string workDirPath = null, bool deleteFilesAfterwards = true)
 {
     _thisLabel        = label;
     _workDirPath      = workDirPath;
     _keyPairFiles     = GMSS.GenerateGMSSKeys(_thisLabel, workDirPath);
     _deleteFilesAfter = deleteFilesAfterwards;
 }
Esempio n. 2
0
 public bool VerifyTestIdentityPacket(byte[] identityPacket, string trustedLabel)
 {
     try
     {
         var demoTestTrustedLabelPublicKeyPath = Path.Combine(_workDirPath, GMSS.GetPublicKeyFileNameForLabel(trustedLabel));
         var jwtDecoded = JsonWebToken.Decode(Encoding.UTF8.GetString(identityPacket), demoTestTrustedLabelPublicKeyPath, trustedLabel, _thisLabel);
         return(true);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }