Aws.AzureTools.BlobExtensions.GenerateBase64BlockID C# (CSharp) Method

GenerateBase64BlockID() private static method

Generates a unique Base64 encoded blockID
private static GenerateBase64BlockID ( long seqNo ) : string
seqNo long The blocks sequence number in the given upload operation.
return string
        private static string GenerateBase64BlockID(long seqNo)
        {
            // 9 bytes needed since base64 encoding requires 6 bits per character (6*12 = 8*9)
            byte[] tempArray = new byte[9];

            for (int m = 0; m < 9; m++)
            {
                tempArray[8 - m] = (byte)((seqNo >> (8 * m)) & 0xFF);
            }

            Convert.ToBase64String(tempArray);

            return Convert.ToBase64String(tempArray);
        }