Пример #1
0
        public static void Generate(string passphrase, string salt)
        {
            signingKey = Convert.ToBase64String(
                new Rfc2898DeriveBytes(
                    Encoding.UTF8.GetBytes(passphrase),
                    Encoding.UTF8.GetBytes(salt),
                    5
                    ).GetBytes(32)
                );

            publicKey = Convert.ToBase64String(
                Ed25519.PublicKey(
                    Encoding.UTF8.GetBytes(signingKey)
                    )
                );
        }