Org.BouncyCastle.Pkix.PkixNameConstraintValidator.ExtractIPsAndSubnetMasks C# (CSharp) Method

ExtractIPsAndSubnetMasks() private method

private ExtractIPsAndSubnetMasks ( byte ipWithSubmask1, byte ipWithSubmask2 ) : byte[][]
ipWithSubmask1 byte
ipWithSubmask2 byte
return byte[][]
        private byte[][] ExtractIPsAndSubnetMasks(
            byte[] ipWithSubmask1,
            byte[] ipWithSubmask2)
    {
        int ipLength = ipWithSubmask1.Length / 2;
        byte[] ip1 = new byte[ipLength];
        byte[] subnetmask1 = new byte[ipLength];
        Array.Copy(ipWithSubmask1, 0, ip1, 0, ipLength);
        Array.Copy(ipWithSubmask1, ipLength, subnetmask1, 0, ipLength);

        byte[] ip2 = new byte[ipLength];
        byte[] subnetmask2 = new byte[ipLength];
        Array.Copy(ipWithSubmask2, 0, ip2, 0, ipLength);
        Array.Copy(ipWithSubmask2, ipLength, subnetmask2, 0, ipLength);
        return new byte[][]
            {ip1, subnetmask1, ip2, subnetmask2};
    }