diff --git a/src/sponge/absorb.rs b/src/sponge/absorb.rs index 3827d428..d3dbe8d2 100644 --- a/src/sponge/absorb.rs +++ b/src/sponge/absorb.rs @@ -227,6 +227,16 @@ impl Absorb for isize { } } +impl Absorb for String { + fn to_sponge_bytes(&self, dest: &mut Vec) { + dest.extend_from_slice(self.as_bytes()) + } + + fn to_sponge_field_elements(&self, dest: &mut Vec) { + self.as_bytes().to_sponge_field_elements(dest) + } +} + impl Absorb for TEAffine

where P::BaseField: ToConstraintField<::BasePrimeField>,