Cryptography/CafeLib.Cryptography.UnitTests/BsvSharp/Passphrase/Mnemonic.cs
/// <summary>
/// Returns the validated data as bytes from the given words and wordList.
/// </summary>
/// <param name="words"></param>
/// <param name="wordList"></param>
/// <returns>Returns the validated data as bytes from the given words and wordList.</returns>
Returns the validated data as bytes from the given words and wordList.
Returns the validated data as bytes from the given words and wordList .
public static byte[] GetEntropy(string words, string[] wordList)
		{
			var bin = WordsToBinaryString(words, wordList);
			if (bin == null) return null;
			var (data, appendedChecksum) = BinaryStringToDataAndChecksum(bin);
			var dataChecksum = GetChecksum(data);
			if (appendedChecksum != dataChecksum) return null;
			return data;
		}
public static byte [ ] GetEntropy ( string words , string [ ] wordList ) { var bin = WordsToBinaryString ( words , wordList ) ; if ( bin == null ) return null ; var ( data , appendedChecksum ) = BinaryStringToDataAndChecksum ( bin ) ; var dataChecksum = GetChecksum ( data ) ; if ( appendedChecksum != dataChecksum ) return null ; return data ; }
Returns the validated data as bytes from the given words and wordList.
Returns the validated data as bytes from the given words and wordList .
Returns the validated data as bytes from the given words and wordList.
Returns the validated data as bytes from the given words and wordList .
words
string
None
wordList
string[]
None