1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015 |
- #if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
- #pragma warning disable
- using System;
- using System.Text;
- using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
- namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities
- {
- /// <summary> General array utilities.</summary>
- public static class Arrays
- {
- public static readonly byte[] EmptyBytes = new byte[0];
- public static readonly int[] EmptyInts = new int[0];
- public static bool AreAllZeroes(byte[] buf, int off, int len)
- {
- uint bits = 0;
- for (int i = 0; i < len; ++i)
- {
- bits |= buf[off + i];
- }
- return bits == 0;
- }
- #if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER || UNITY_2021_2_OR_NEWER
- public static bool AreAllZeroes(ReadOnlySpan<byte> buf)
- {
- uint bits = 0;
- for (int i = 0; i < buf.Length; ++i)
- {
- bits |= buf[i];
- }
- return bits == 0;
- }
- #endif
- public static bool AreEqual(
- bool[] a,
- bool[] b)
- {
- if (a == b)
- return true;
- if (a == null || b == null)
- return false;
- return HaveSameContents(a, b);
- }
- public static bool AreEqual(
- char[] a,
- char[] b)
- {
- if (a == b)
- return true;
- if (a == null || b == null)
- return false;
- return HaveSameContents(a, b);
- }
- /// <summary>
- /// Are two arrays equal.
- /// </summary>
- /// <param name="a">Left side.</param>
- /// <param name="b">Right side.</param>
- /// <returns>True if equal.</returns>
- public static bool AreEqual(byte[] a, byte[] b)
- {
- if (a == b)
- return true;
- if (a == null || b == null)
- return false;
- return HaveSameContents(a, b);
- }
- public static bool AreEqual(byte[] a, int aFromIndex, int aToIndex, byte[] b, int bFromIndex, int bToIndex)
- {
- int aLength = aToIndex - aFromIndex;
- int bLength = bToIndex - bFromIndex;
- if (aLength != bLength)
- return false;
- for (int i = 0; i < aLength; ++i)
- {
- if (a[aFromIndex + i] != b[bFromIndex + i])
- return false;
- }
- return true;
- }
- /// <summary>
- /// A constant time equals comparison - does not terminate early if
- /// test will fail.
- /// </summary>
- /// <param name="a">first array</param>
- /// <param name="b">second array</param>
- /// <returns>true if arrays equal, false otherwise.</returns>
- public static bool ConstantTimeAreEqual(byte[] a, byte[] b)
- {
- if (null == a || null == b)
- return false;
- if (a == b)
- return true;
- int len = System.Math.Min(a.Length, b.Length);
- int nonEqual = a.Length ^ b.Length;
- for (int i = 0; i < len; ++i)
- {
- nonEqual |= (a[i] ^ b[i]);
- }
- for (int i = len; i < b.Length; ++i)
- {
- nonEqual |= (b[i] ^ ~b[i]);
- }
- return 0 == nonEqual;
- }
- public static bool ConstantTimeAreEqual(int len, byte[] a, int aOff, byte[] b, int bOff)
- {
- if (null == a)
- throw new ArgumentNullException("a");
- if (null == b)
- throw new ArgumentNullException("b");
- if (len < 0)
- throw new ArgumentException("cannot be negative", "len");
- if (aOff > (a.Length - len))
- throw new IndexOutOfRangeException("'aOff' value invalid for specified length");
- if (bOff > (b.Length - len))
- throw new IndexOutOfRangeException("'bOff' value invalid for specified length");
- int d = 0;
- for (int i = 0; i < len; ++i)
- {
- d |= a[aOff + i] ^ b[bOff + i];
- }
- return 0 == d;
- }
- #if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER || UNITY_2021_2_OR_NEWER
- public static bool ConstantTimeAreEqual(Span<byte> a, Span<byte> b)
- {
- if (a.Length != b.Length)
- throw new ArgumentException("Spans to compare must have equal length");
- int d = 0;
- for (int i = 0, count = a.Length; i < count; ++i)
- {
- d |= a[i] ^ b[i];
- }
- return 0 == d;
- }
- #endif
- public static bool AreEqual(
- int[] a,
- int[] b)
- {
- if (a == b)
- return true;
- if (a == null || b == null)
- return false;
- return HaveSameContents(a, b);
- }
- [CLSCompliant(false)]
- public static bool AreEqual(uint[] a, uint[] b)
- {
- if (a == b)
- return true;
- if (a == null || b == null)
- return false;
- return HaveSameContents(a, b);
- }
- public static bool AreEqual(long[] a, long[] b)
- {
- if (a == b)
- return true;
- if (a == null || b == null)
- return false;
- return HaveSameContents(a, b);
- }
- [CLSCompliant(false)]
- public static bool AreEqual(ulong[] a, ulong[] b)
- {
- if (a == b)
- return true;
- if (a == null || b == null)
- return false;
- return HaveSameContents(a, b);
- }
- private static bool HaveSameContents(
- bool[] a,
- bool[] b)
- {
- int i = a.Length;
- if (i != b.Length)
- return false;
- while (i != 0)
- {
- --i;
- if (a[i] != b[i])
- return false;
- }
- return true;
- }
- private static bool HaveSameContents(
- char[] a,
- char[] b)
- {
- int i = a.Length;
- if (i != b.Length)
- return false;
- while (i != 0)
- {
- --i;
- if (a[i] != b[i])
- return false;
- }
- return true;
- }
- private static bool HaveSameContents(
- byte[] a,
- byte[] b)
- {
- int i = a.Length;
- if (i != b.Length)
- return false;
- while (i != 0)
- {
- --i;
- if (a[i] != b[i])
- return false;
- }
- return true;
- }
- private static bool HaveSameContents(
- int[] a,
- int[] b)
- {
- int i = a.Length;
- if (i != b.Length)
- return false;
- while (i != 0)
- {
- --i;
- if (a[i] != b[i])
- return false;
- }
- return true;
- }
- private static bool HaveSameContents(uint[] a, uint[] b)
- {
- int i = a.Length;
- if (i != b.Length)
- return false;
- while (i != 0)
- {
- --i;
- if (a[i] != b[i])
- return false;
- }
- return true;
- }
- private static bool HaveSameContents(long[] a, long[] b)
- {
- int i = a.Length;
- if (i != b.Length)
- return false;
- while (i != 0)
- {
- --i;
- if (a[i] != b[i])
- return false;
- }
- return true;
- }
- private static bool HaveSameContents(ulong[] a, ulong[] b)
- {
- int i = a.Length;
- if (i != b.Length)
- return false;
- while (i != 0)
- {
- --i;
- if (a[i] != b[i])
- return false;
- }
- return true;
- }
- public static string ToString(
- object[] a)
- {
- StringBuilder sb = new StringBuilder("[");
- if (a.Length > 0)
- {
- sb.Append(a[0]);
- for (int index = 1; index < a.Length; ++index)
- {
- sb.Append(", ").Append(a[index]);
- }
- }
- sb.Append(']');
- return sb.ToString();
- }
- public static int GetHashCode(byte[] data)
- {
- if (data == null)
- {
- return 0;
- }
- int i = data.Length;
- int hc = i + 1;
- while (--i >= 0)
- {
- hc *= 257;
- hc ^= data[i];
- }
- return hc;
- }
- public static int GetHashCode(byte[] data, int off, int len)
- {
- if (data == null)
- {
- return 0;
- }
- int i = len;
- int hc = i + 1;
- while (--i >= 0)
- {
- hc *= 257;
- hc ^= data[off + i];
- }
- return hc;
- }
- public static int GetHashCode(int[] data)
- {
- if (data == null)
- return 0;
- int i = data.Length;
- int hc = i + 1;
- while (--i >= 0)
- {
- hc *= 257;
- hc ^= data[i];
- }
- return hc;
- }
- [CLSCompliant(false)]
- public static int GetHashCode(ushort[] data)
- {
- if (data == null)
- return 0;
- int i = data.Length;
- int hc = i + 1;
- while (--i >= 0)
- {
- hc *= 257;
- hc ^= data[i];
- }
- return hc;
- }
- public static int GetHashCode(int[] data, int off, int len)
- {
- if (data == null)
- return 0;
- int i = len;
- int hc = i + 1;
- while (--i >= 0)
- {
- hc *= 257;
- hc ^= data[off + i];
- }
- return hc;
- }
- [CLSCompliant(false)]
- public static int GetHashCode(uint[] data)
- {
- if (data == null)
- return 0;
- int i = data.Length;
- int hc = i + 1;
- while (--i >= 0)
- {
- hc *= 257;
- hc ^= (int)data[i];
- }
- return hc;
- }
- [CLSCompliant(false)]
- public static int GetHashCode(uint[] data, int off, int len)
- {
- if (data == null)
- return 0;
- int i = len;
- int hc = i + 1;
- while (--i >= 0)
- {
- hc *= 257;
- hc ^= (int)data[off + i];
- }
- return hc;
- }
- [CLSCompliant(false)]
- public static int GetHashCode(ulong[] data)
- {
- if (data == null)
- return 0;
- int i = data.Length;
- int hc = i + 1;
- while (--i >= 0)
- {
- ulong di = data[i];
- hc *= 257;
- hc ^= (int)di;
- hc *= 257;
- hc ^= (int)(di >> 32);
- }
- return hc;
- }
- [CLSCompliant(false)]
- public static int GetHashCode(ulong[] data, int off, int len)
- {
- if (data == null)
- return 0;
- int i = len;
- int hc = i + 1;
- while (--i >= 0)
- {
- ulong di = data[off + i];
- hc *= 257;
- hc ^= (int)di;
- hc *= 257;
- hc ^= (int)(di >> 32);
- }
- return hc;
- }
- public static bool[] Clone(bool[] data)
- {
- return data == null ? null : (bool[])data.Clone();
- }
- public static byte[] Clone(byte[] data)
- {
- return data == null ? null : (byte[])data.Clone();
- }
- public static short[] Clone(short[] data)
- {
- return data == null ? null : (short[])data.Clone();
- }
- [CLSCompliant(false)]
- public static ushort[] Clone(ushort[] data)
- {
- return data == null ? null : (ushort[])data.Clone();
- }
- public static int[] Clone(int[] data)
- {
- return data == null ? null : (int[])data.Clone();
- }
- [CLSCompliant(false)]
- public static uint[] Clone(uint[] data)
- {
- return data == null ? null : (uint[])data.Clone();
- }
- public static long[] Clone(long[] data)
- {
- return data == null ? null : (long[])data.Clone();
- }
- [CLSCompliant(false)]
- public static ulong[] Clone(ulong[] data)
- {
- return data == null ? null : (ulong[])data.Clone();
- }
- public static byte[] Clone(byte[] data, byte[] existing)
- {
- if (data == null)
- return null;
- if (existing == null || existing.Length != data.Length)
- return Clone(data);
- Array.Copy(data, 0, existing, 0, existing.Length);
- return existing;
- }
- [CLSCompliant(false)]
- public static ulong[] Clone(ulong[] data, ulong[] existing)
- {
- if (data == null)
- return null;
- if (existing == null || existing.Length != data.Length)
- return Clone(data);
- Array.Copy(data, 0, existing, 0, existing.Length);
- return existing;
- }
- public static bool Contains(byte[] a, byte n)
- {
- for (int i = 0; i < a.Length; ++i)
- {
- if (a[i] == n)
- return true;
- }
- return false;
- }
- public static bool Contains(short[] a, short n)
- {
- for (int i = 0; i < a.Length; ++i)
- {
- if (a[i] == n)
- return true;
- }
- return false;
- }
- public static bool Contains(int[] a, int n)
- {
- for (int i = 0; i < a.Length; ++i)
- {
- if (a[i] == n)
- return true;
- }
- return false;
- }
- public static void Fill(
- byte[] buf,
- byte b)
- {
- int i = buf.Length;
- while (i > 0)
- {
- buf[--i] = b;
- }
- }
- [CLSCompliant(false)]
- public static void Fill(
- ulong[] buf,
- ulong b)
- {
- int i = buf.Length;
- while (i > 0)
- {
- buf[--i] = b;
- }
- }
- public static void Fill(byte[] buf, int from, int to, byte b)
- {
- for (int i = from; i < to; ++i)
- {
- buf[i] = b;
- }
- }
- public static void Fill<T>(T[] ts, T t)
- {
- for (int i = 0; i < ts.Length; ++i)
- {
- ts[i] = t;
- }
- }
- #if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER || UNITY_2021_2_OR_NEWER
- public static void Fill<T>(Span<T> ts, T t)
- {
- ts.Fill(t);
- }
- #endif
- public static byte[] CopyOf(byte[] data, int newLength)
- {
- byte[] tmp = new byte[newLength];
- Array.Copy(data, 0, tmp, 0, System.Math.Min(newLength, data.Length));
- return tmp;
- }
- public static char[] CopyOf(char[] data, int newLength)
- {
- char[] tmp = new char[newLength];
- Array.Copy(data, 0, tmp, 0, System.Math.Min(newLength, data.Length));
- return tmp;
- }
- public static int[] CopyOf(int[] data, int newLength)
- {
- int[] tmp = new int[newLength];
- Array.Copy(data, 0, tmp, 0, System.Math.Min(newLength, data.Length));
- return tmp;
- }
- [CLSCompliant(false)]
- public static uint[] CopyOf(uint[] data, int newLength)
- {
- uint[] tmp = new uint[newLength];
- Array.Copy(data, 0, tmp, 0, System.Math.Min(newLength, data.Length));
- return tmp;
- }
- public static long[] CopyOf(long[] data, int newLength)
- {
- long[] tmp = new long[newLength];
- Array.Copy(data, 0, tmp, 0, System.Math.Min(newLength, data.Length));
- return tmp;
- }
- public static BigInteger[] CopyOf(BigInteger[] data, int newLength)
- {
- BigInteger[] tmp = new BigInteger[newLength];
- Array.Copy(data, 0, tmp, 0, System.Math.Min(newLength, data.Length));
- return tmp;
- }
- /**
- * Make a copy of a range of bytes from the passed in data array. The range can
- * extend beyond the end of the input array, in which case the return array will
- * be padded with zeroes.
- *
- * @param data the array from which the data is to be copied.
- * @param from the start index at which the copying should take place.
- * @param to the final index of the range (exclusive).
- *
- * @return a new byte array containing the range given.
- */
- public static byte[] CopyOfRange(byte[] data, int from, int to)
- {
- int newLength = GetLength(from, to);
- byte[] tmp = new byte[newLength];
- Array.Copy(data, from, tmp, 0, System.Math.Min(newLength, data.Length - from));
- return tmp;
- }
- public static int[] CopyOfRange(int[] data, int from, int to)
- {
- int newLength = GetLength(from, to);
- int[] tmp = new int[newLength];
- Array.Copy(data, from, tmp, 0, System.Math.Min(newLength, data.Length - from));
- return tmp;
- }
- public static long[] CopyOfRange(long[] data, int from, int to)
- {
- int newLength = GetLength(from, to);
- long[] tmp = new long[newLength];
- Array.Copy(data, from, tmp, 0, System.Math.Min(newLength, data.Length - from));
- return tmp;
- }
- public static BigInteger[] CopyOfRange(BigInteger[] data, int from, int to)
- {
- int newLength = GetLength(from, to);
- BigInteger[] tmp = new BigInteger[newLength];
- Array.Copy(data, from, tmp, 0, System.Math.Min(newLength, data.Length - from));
- return tmp;
- }
- private static int GetLength(int from, int to)
- {
- int newLength = to - from;
- if (newLength < 0)
- throw new ArgumentException(from + " > " + to);
- return newLength;
- }
- public static byte[] Append(byte[] a, byte b)
- {
- if (a == null)
- return new byte[] { b };
- int length = a.Length;
- byte[] result = new byte[length + 1];
- Array.Copy(a, 0, result, 0, length);
- result[length] = b;
- return result;
- }
- public static short[] Append(short[] a, short b)
- {
- if (a == null)
- return new short[] { b };
- int length = a.Length;
- short[] result = new short[length + 1];
- Array.Copy(a, 0, result, 0, length);
- result[length] = b;
- return result;
- }
- public static int[] Append(int[] a, int b)
- {
- if (a == null)
- return new int[] { b };
- int length = a.Length;
- int[] result = new int[length + 1];
- Array.Copy(a, 0, result, 0, length);
- result[length] = b;
- return result;
- }
- public static byte[] Concatenate(byte[] a, byte[] b)
- {
- if (a == null)
- return Clone(b);
- if (b == null)
- return Clone(a);
- byte[] rv = new byte[a.Length + b.Length];
- Array.Copy(a, 0, rv, 0, a.Length);
- Array.Copy(b, 0, rv, a.Length, b.Length);
- return rv;
- }
- [CLSCompliant(false)]
- public static ushort[] Concatenate(ushort[] a, ushort[] b)
- {
- if (a == null)
- return Clone(b);
- if (b == null)
- return Clone(a);
- ushort[] rv = new ushort[a.Length + b.Length];
- Array.Copy(a, 0, rv, 0, a.Length);
- Array.Copy(b, 0, rv, a.Length, b.Length);
- return rv;
- }
- public static byte[] ConcatenateAll(params byte[][] vs)
- {
- byte[][] nonNull = new byte[vs.Length][];
- int count = 0;
- int totalLength = 0;
- for (int i = 0; i < vs.Length; ++i)
- {
- byte[] v = vs[i];
- if (v != null)
- {
- nonNull[count++] = v;
- totalLength += v.Length;
- }
- }
- byte[] result = new byte[totalLength];
- int pos = 0;
- for (int j = 0; j < count; ++j)
- {
- byte[] v = nonNull[j];
- Array.Copy(v, 0, result, pos, v.Length);
- pos += v.Length;
- }
- return result;
- }
- public static int[] Concatenate(int[] a, int[] b)
- {
- if (a == null)
- return Clone(b);
- if (b == null)
- return Clone(a);
- int[] rv = new int[a.Length + b.Length];
- Array.Copy(a, 0, rv, 0, a.Length);
- Array.Copy(b, 0, rv, a.Length, b.Length);
- return rv;
- }
- [CLSCompliant(false)]
- public static uint[] Concatenate(uint[] a, uint[] b)
- {
- if (a == null)
- return Clone(b);
- if (b == null)
- return Clone(a);
- uint[] rv = new uint[a.Length + b.Length];
- Array.Copy(a, 0, rv, 0, a.Length);
- Array.Copy(b, 0, rv, a.Length, b.Length);
- return rv;
- }
- public static byte[] Prepend(byte[] a, byte b)
- {
- if (a == null)
- return new byte[] { b };
- int length = a.Length;
- byte[] result = new byte[length + 1];
- Array.Copy(a, 0, result, 1, length);
- result[0] = b;
- return result;
- }
- public static short[] Prepend(short[] a, short b)
- {
- if (a == null)
- return new short[] { b };
- int length = a.Length;
- short[] result = new short[length + 1];
- Array.Copy(a, 0, result, 1, length);
- result[0] = b;
- return result;
- }
- public static int[] Prepend(int[] a, int b)
- {
- if (a == null)
- return new int[] { b };
- int length = a.Length;
- int[] result = new int[length + 1];
- Array.Copy(a, 0, result, 1, length);
- result[0] = b;
- return result;
- }
- public static T[] Prepend<T>(T[] a, T b)
- {
- if (a == null)
- return new T[1]{ b };
- T[] result = new T[1 + a.Length];
- result[0] = b;
- a.CopyTo(result, 1);
- return result;
- }
- public static byte[] Reverse(byte[] a)
- {
- if (a == null)
- return null;
- int p1 = 0, p2 = a.Length;
- byte[] result = new byte[p2];
- while (--p2 >= 0)
- {
- result[p2] = a[p1++];
- }
- return result;
- }
- public static int[] Reverse(int[] a)
- {
- if (a == null)
- return null;
- int p1 = 0, p2 = a.Length;
- int[] result = new int[p2];
- while (--p2 >= 0)
- {
- result[p2] = a[p1++];
- }
- return result;
- }
- public static T[] ReverseInPlace<T>(T[] array)
- {
- if (null == array)
- return null;
- Array.Reverse(array);
- return array;
- }
- public static void Clear(byte[] data)
- {
- if (null != data)
- {
- Array.Clear(data, 0, data.Length);
- }
- }
- public static void Clear(int[] data)
- {
- if (null != data)
- {
- Array.Clear(data, 0, data.Length);
- }
- }
- public static bool IsNullOrContainsNull(object[] array)
- {
- if (null == array)
- return true;
- int count = array.Length;
- for (int i = 0; i < count; ++i)
- {
- if (null == array[i])
- return true;
- }
- return false;
- }
- public static bool IsNullOrEmpty(byte[] array)
- {
- return null == array || array.Length < 1;
- }
- public static bool IsNullOrEmpty(object[] array)
- {
- return null == array || array.Length < 1;
- }
- #if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER || UNITY_2021_2_OR_NEWER
- public static byte[] Concatenate(ReadOnlySpan<byte> a, ReadOnlySpan<byte> b)
- {
- byte[] rv = new byte[a.Length + b.Length];
- a.CopyTo(rv);
- b.CopyTo(rv.AsSpan(a.Length));
- return rv;
- }
- public static byte[] Concatenate(ReadOnlySpan<byte> a, ReadOnlySpan<byte> b, ReadOnlySpan<byte> c)
- {
- byte[] rv = new byte[a.Length + b.Length + c.Length];
- a.CopyTo(rv);
- b.CopyTo(rv.AsSpan(a.Length));
- c.CopyTo(rv.AsSpan(a.Length + b.Length));
- return rv;
- }
- public static byte[] Concatenate(ReadOnlySpan<byte> a, ReadOnlySpan<byte> b, ReadOnlySpan<byte> c,
- ReadOnlySpan<byte> d)
- {
- byte[] rv = new byte[a.Length + b.Length + c.Length + d.Length];
- a.CopyTo(rv);
- b.CopyTo(rv.AsSpan(a.Length));
- c.CopyTo(rv.AsSpan(a.Length + b.Length));
- d.CopyTo(rv.AsSpan(a.Length + b.Length + c.Length));
- return rv;
- }
- #endif
- }
- }
- #pragma warning restore
- #endif
|