diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2014-08-24 16:47:32 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2014-08-24 16:47:32 +0700 |
commit | da656890c709963fb112d4813a2542302994bb35 (patch) | |
tree | 9cf32b3ce55555eea21fc95fe8f19844f3134550 /crypto/src/util | |
parent | Add TLS test data from Java API (diff) | |
download | BouncyCastle.NET-ed25519-da656890c709963fb112d4813a2542302994bb35.tar.xz |
Finish initial porting of TLS 1.2 client from Java API
Diffstat (limited to 'crypto/src/util')
-rw-r--r-- | crypto/src/util/Arrays.cs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/crypto/src/util/Arrays.cs b/crypto/src/util/Arrays.cs index 87bc1ba65..27fd18d6d 100644 --- a/crypto/src/util/Arrays.cs +++ b/crypto/src/util/Arrays.cs @@ -544,6 +544,19 @@ namespace Org.BouncyCastle.Utilities return rv; } + 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; + } + public static byte[] Prepend(byte[] a, byte b) { if (a == null) |