diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2018-10-14 19:40:02 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2018-10-14 19:40:02 +0700 |
commit | 94173c7f8b2d87b28353b7e9ee8d0f2514f02875 (patch) | |
tree | bee9c940b4ada80b23e316386e64a945290d8306 /crypto/src/util/Arrays.cs | |
parent | Move XDH/EdDSA key generation into low-level (diff) | |
download | BouncyCastle.NET-ed25519-94173c7f8b2d87b28353b7e9ee8d0f2514f02875.tar.xz |
Port of CVC-ECDSA and PLAIN-ECDSA from Java
Diffstat (limited to 'crypto/src/util/Arrays.cs')
-rw-r--r-- | crypto/src/util/Arrays.cs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/crypto/src/util/Arrays.cs b/crypto/src/util/Arrays.cs index a9a574dbf..4a8c65e88 100644 --- a/crypto/src/util/Arrays.cs +++ b/crypto/src/util/Arrays.cs @@ -469,6 +469,14 @@ namespace Org.BouncyCastle.Utilities } } + public static void Fill(byte[] buf, int from, int to, byte b) + { + for (int i = from; i < to; ++i) + { + buf[i] = b; + } + } + public static byte[] CopyOf(byte[] data, int newLength) { byte[] tmp = new byte[newLength]; |