Skip to content

Commit

Permalink
[creds]: make decompress public
Browse files Browse the repository at this point in the history
  • Loading branch information
DougAnderson444 committed Jul 27, 2024
1 parent 871d2ad commit 945138e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/delanocreds/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub(crate) fn try_into_scalar(value: Vec<u8>) -> Result<Scalar, Error> {
}

/// Try Decompress G1
pub(crate) fn try_decompress_g1(value: Vec<u8>) -> Result<G1Affine, Error> {
pub fn try_decompress_g1(value: Vec<u8>) -> Result<G1Affine, Error> {
let mut bytes = [0u8; G1Affine::COMPRESSED_BYTES];
bytes.copy_from_slice(&value);
let maybe_g1 = G1Affine::from_compressed(&bytes);
Expand All @@ -33,7 +33,7 @@ pub(crate) fn try_decompress_g1(value: Vec<u8>) -> Result<G1Affine, Error> {
}

/// Try Decompress G2
pub(crate) fn try_decompress_g2(value: Vec<u8>) -> Result<G2Affine, Error> {
pub fn try_decompress_g2(value: Vec<u8>) -> Result<G2Affine, Error> {
let mut bytes = [0u8; G2Affine::COMPRESSED_BYTES];
bytes.copy_from_slice(&value);
let maybe_g2 = G2Affine::from_compressed(&bytes);
Expand Down

0 comments on commit 945138e

Please sign in to comment.