diff options
Diffstat (limited to 'crypto/src/util')
-rw-r--r-- | crypto/src/util/Arrays.cs | 1 | ||||
-rw-r--r-- | crypto/src/util/Bytes.cs | 4 | ||||
-rw-r--r-- | crypto/src/util/Integers.cs | 4 | ||||
-rw-r--r-- | crypto/src/util/Longs.cs | 4 | ||||
-rw-r--r-- | crypto/src/util/io/Streams.cs | 8 |
5 files changed, 8 insertions, 13 deletions
diff --git a/crypto/src/util/Arrays.cs b/crypto/src/util/Arrays.cs index 78c4e8ffc..fdf08a90c 100644 --- a/crypto/src/util/Arrays.cs +++ b/crypto/src/util/Arrays.cs @@ -705,6 +705,7 @@ namespace Org.BouncyCastle.Utilities return rv; } + [CLSCompliantAttribute(false)] public static ushort[] Concatenate(ushort[] a, ushort[] b) { if (a == null) diff --git a/crypto/src/util/Bytes.cs b/crypto/src/util/Bytes.cs index 0d73d67ae..ecde85dde 100644 --- a/crypto/src/util/Bytes.cs +++ b/crypto/src/util/Bytes.cs @@ -4,7 +4,7 @@ namespace Org.BouncyCastle.Utilities { public abstract class Bytes { - public static readonly uint BYTES = 1; - public static readonly uint SIZE = 8; + public const int NumBits = 8; + public const int NumBytes = 1; } } diff --git a/crypto/src/util/Integers.cs b/crypto/src/util/Integers.cs index b7bd25ce6..11045d9e3 100644 --- a/crypto/src/util/Integers.cs +++ b/crypto/src/util/Integers.cs @@ -6,8 +6,8 @@ namespace Org.BouncyCastle.Utilities { public abstract class Integers { - public static readonly uint BYTES = 4; - public static readonly uint SIZE = 32; + public const int NumBits = 32; + public const int NumBytes = 4; private static readonly byte[] DeBruijnTZ = { 0x00, 0x01, 0x02, 0x18, 0x03, 0x13, 0x06, 0x19, 0x16, 0x04, 0x14, 0x0A, diff --git a/crypto/src/util/Longs.cs b/crypto/src/util/Longs.cs index 892e57137..91dee2b50 100644 --- a/crypto/src/util/Longs.cs +++ b/crypto/src/util/Longs.cs @@ -6,8 +6,8 @@ namespace Org.BouncyCastle.Utilities { public abstract class Longs { - public static readonly uint BYTES = 8; - public static readonly uint SIZE = 64; + public const int NumBits = 64; + public const int NumBytes = 8; public static long Reverse(long i) { diff --git a/crypto/src/util/io/Streams.cs b/crypto/src/util/io/Streams.cs index 503a1b4f1..506b2489f 100644 --- a/crypto/src/util/io/Streams.cs +++ b/crypto/src/util/io/Streams.cs @@ -100,15 +100,9 @@ namespace Org.BouncyCastle.Utilities.IO /// <exception cref="IOException"></exception> public static int WriteBufTo(MemoryStream buf, byte[] output, int offset) { -#if PORTABLE - byte[] bytes = buf.ToArray(); - bytes.CopyTo(output, offset); - return bytes.Length; -#else int size = (int)buf.Length; - buf.WriteTo(new MemoryStream(output, offset, size, true)); + WriteBufTo(buf, new MemoryStream(output, offset, size)); return size; -#endif } public static void WriteZeroes(Stream outStr, long count) |