summary refs log tree commit diff
path: root/crypto/src/bcpg/sig/Exportable.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2022-10-27 19:33:38 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2022-10-27 19:33:38 +0700
commit0f5e5e54e55c23222f6f934f2c32f212f13a34ae (patch)
treeea7a9def6ee86a123457912c6866e3c95b3bb679 /crypto/src/bcpg/sig/Exportable.cs
parentPqc.Crypto.Bike cleanup (diff)
downloadBouncyCastle.NET-ed25519-0f5e5e54e55c23222f6f934f2c32f212f13a34ae.tar.xz
Refactoring in Bcpg.Sig
Diffstat (limited to 'crypto/src/bcpg/sig/Exportable.cs')
-rw-r--r--crypto/src/bcpg/sig/Exportable.cs12
1 files changed, 1 insertions, 11 deletions
diff --git a/crypto/src/bcpg/sig/Exportable.cs b/crypto/src/bcpg/sig/Exportable.cs
index 4d030346f..8a9eafe09 100644
--- a/crypto/src/bcpg/sig/Exportable.cs
+++ b/crypto/src/bcpg/sig/Exportable.cs
@@ -10,17 +10,7 @@ namespace Org.BouncyCastle.Bcpg.Sig
     {
         private static byte[] BooleanToByteArray(bool val)
         {
-            byte[]    data = new byte[1];
-
-            if (val)
-            {
-                data[0] = 1;
-                return data;
-            }
-            else
-            {
-                return data;
-            }
+            return new byte[1]{ Convert.ToByte(val) };
         }
 
         public Exportable(