CreateKeys() public static méthode

public static CreateKeys ( byte &publicKey, byte &privateKey ) : void
publicKey byte
privateKey byte
Résultat void
Exemple #1
0
        public DigitalSignature(string nickname, DigitalSignatureAlgorithm digitalSignatureAlgorithm)
        {
            this.Nickname = nickname;
            this.DigitalSignatureAlgorithm = digitalSignatureAlgorithm;

            if (digitalSignatureAlgorithm == DigitalSignatureAlgorithm.EcDsaP521_Sha256)
            {
                byte[] publicKey, privateKey;

                EcDsaP521_Sha256.CreateKeys(out publicKey, out privateKey);

                this.PublicKey  = publicKey;
                this.PrivateKey = privateKey;
            }
            else if (digitalSignatureAlgorithm == DigitalSignatureAlgorithm.Rsa2048_Sha256)
            {
                byte[] publicKey, privateKey;

                Rsa2048_Sha256.CreateKeys(out publicKey, out privateKey);

                this.PublicKey  = publicKey;
                this.PrivateKey = privateKey;
            }
        }