Neos.IdentityServer 3.0/Neos.IdentityServer.QrCodeNet/ReedSolomon/ReedSolomonEncoder.cs
/// <summary>
/// Convert data codewords to int array. And add error correction space at end of that array
/// </summary>
/// <param name="dataBytes">data codewords array</param>
/// <param name="dataLength">data codewords length</param>
/// <param name="numECBytes">Num of error correction bytes</param>
/// <returns>Int array for data codewords array follow by error correction space</returns>
Convert data codewords to int array. And add error correction space at end of that array
Convert data codewords to int array . And add error correction space at end of that array
private static int[] ConvertToIntArray(byte[] dataBytes, int dataLength, int numECBytes)
		{
			int[] resultArray = new int[dataLength + numECBytes];
			for(int index = 0; index < dataLength; index++)
			{
				resultArray[index] = dataBytes[index] & 0xff;
			}
			return resultArray;
		}
private static int [ ] ConvertToIntArray ( byte [ ] dataBytes , int dataLength , int numECBytes ) { int [ ] resultArray = new int [ dataLength + numECBytes ] ; for ( int index = 0 ; index < dataLength ; index ++ ) { resultArray [ index ] = dataBytes [ index ] & 0xff ; } return resultArray ; }
Convert data codewords to int array.
Convert data codewords to int array .
Int array for data codewords array follow by error correction space
Int array for data codewords array follow by error correction space
dataBytes
byte[]
data codewords array
data codewords array
dataLength
int
data codewords length
data codewords length
numECBytes
int
Num of error correction bytes
Num of error correction bytes