79439629

Date: 2025-02-14 14:13:54
Score: 1
Natty:
Report link

I want to enable nfc in my pkpass. I have used this code

     pass.nfc = new NFC
     {
         message = mbr.MembershipID,
         encryptionPublicKey = "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE7LGd0HX4cK+WoiQB7DpV4D59hUfDBgGeQfu2f20M4gEfQiSNcOj8J+5N5dg2iYm7//cIusxHeInU2WZEZAQZZg==",
         requiresAuthentication = false
     };
    
    but now the pkpass is not able to get open, please guid me.
    
    I have used below code to create encryptionpublickey 
    
    using (ECDiffieHellman ecdh = ECDiffieHellman.Create(ECCurve.NamedCurves.nistP256))
    {
        // Export public key in X.509 format
        byte[] publicKey = ecdh.ExportSubjectPublicKeyInfo();
    
        // Convert to Base64
        string base64PublicKey = Convert.ToBase64String(publicKey);
    
        Console.WriteLine("Base64-encoded X.509 SubjectPublicKeyInfo:");
        Console.WriteLine(base64PublicKey);
    }
Reasons:
  • RegEx Blacklisted phrase (1): I want
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Yash Singh