snarkvm_console_program/data/ciphertext/
mod.rs

1// Copyright 2024 Aleo Network Foundation
2// This file is part of the snarkVM library.
3
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at:
7
8// http://www.apache.org/licenses/LICENSE-2.0
9
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15
16mod bytes;
17mod decrypt;
18mod equal;
19mod from_bits;
20mod from_fields;
21mod num_randomizers;
22mod parse;
23mod serialize;
24mod size_in_fields;
25mod to_bits;
26mod to_fields;
27
28use crate::Plaintext;
29use snarkvm_console_account::ViewKey;
30use snarkvm_console_network::prelude::*;
31use snarkvm_console_types::{Boolean, Field, Group};
32
33use core::ops::Deref;
34
35#[derive(Clone)]
36pub struct Ciphertext<N: Network>(Vec<Field<N>>);
37
38impl<N: Network> Deref for Ciphertext<N> {
39    type Target = [Field<N>];
40
41    fn deref(&self) -> &Self::Target {
42        &self.0
43    }
44}