示例#1
0
        public static byte[] SecretKeyFromSeed(byte[] privateKeySeed)
        {
            if (privateKeySeed == null)
            {
                throw new ArgumentNullException("privateKeySeed");
            }
            if (privateKeySeed.Length != PrivateKeySeedSizeInBytes)
            {
                throw new ArgumentException("privateKeySeed");
            }

            byte[] sk = new byte[PrivateKeySeedSizeInBytes];
            Ed25519Operations.crypto_secret_key_from_seed(sk, 0, privateKeySeed, 0);

            return(sk);
        }