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); } }
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)); } }
public NearSignature(byte[] signature) { _keyType = KeyType.Ed25519; _data = new ByteArray64() { Buffer = signature }; }
public NearSignature(KeyType keyType, ByteArray64 data) { _keyType = KeyType.Ed25519; _data = data; }