Skip to content

Commit

Permalink
Add a comment for Signature deserialization
Browse files Browse the repository at this point in the history
  • Loading branch information
fjarri committed Mar 18, 2021
1 parent 960928c commit 1e3ad49
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions umbral-pre/src/curve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ impl SerializableToArray for Signature {
}

fn from_array(arr: &GenericArray<u8, Self::Size>) -> Option<Self> {
// Note that it will not normalize `s` automatically,
// and if it is not normalized, verification will fail.
BackendSignature::<CurveType>::from_bytes(arr.as_slice())
.ok()
.map(Self)
Expand Down

0 comments on commit 1e3ad49

Please sign in to comment.