コード例 #1
0
 internal void AcquireFrom(ByteArray64 other)
 {
     for (long i = 0; i < other.buffer.LongLength; ++i)
     {
         Set(i << 30, other.buffer[i], 0, other.buffer[i].Length);
     }
 }
コード例 #2
0
ファイル: NearSignature.cs プロジェクト: near/near-api-unity
        private static NearSignature FromRawDataStream(MemoryStream stream)
        {
            using (var reader = new NearBinaryReader(stream, true))
            {
                KeyType keyType;
                switch ((int)reader.ReadByte())
                {
                case 0:
                {
                    keyType = KeyType.Ed25519;
                    break;
                }

                default:
                {
                    throw new NotSupportedException("Invalid key type in raw bytes for public key");
                }
                }

                var data = new ByteArray64
                {
                    Buffer = reader.ReadBytes(64)
                };

                return(new NearSignature(keyType, data));
            }
        }
コード例 #3
0
ファイル: NearSignature.cs プロジェクト: near/near-api-unity
 public NearSignature(byte[] signature)
 {
     _keyType = KeyType.Ed25519;
     _data    = new ByteArray64()
     {
         Buffer = signature
     };
 }
コード例 #4
0
ファイル: NearSignature.cs プロジェクト: near/near-api-unity
 public NearSignature(KeyType keyType, ByteArray64 data)
 {
     _keyType = KeyType.Ed25519;
     _data    = data;
 }