@@ -381,55 +381,68 @@ impl AlgorithmName for AsconAXofCore {
381381 }
382382}
383383
384- /// Ascon hash
385- ///
386- /// ```
387- /// use ascon_hash::{AsconHash, Digest};
388- ///
389- /// let mut hasher = AsconHash::new();
390- /// hasher.update(b"some bytes");
391- /// let digest = hasher.finalize();
392- /// assert_eq!(&digest[..], b"\xb7\x42\xca\x75\xe5\x70\x38\x75\x70\x59\xcc\xcc\x68\x74\x71\x4f\x9d\xbd\x7f\xc5\x92\x4a\x7d\xf4\xe3\x16\x59\x4f\xd1\x42\x6c\xa8");
393- /// ```
394- pub type AsconHash = CoreWrapper < AsconCore > ;
395- /// AsconA hash
396- ///
397- /// ```
398- /// use ascon_hash::{AsconAHash, Digest};
399- ///
400- /// let mut hasher = AsconAHash::new();
401- /// hasher.update(b"some bytes");
402- /// let digest = hasher.finalize();
403- /// assert_eq!(&digest[..], b"\x1d\x1a\xc8\x74\x4a\x4a\x05\x81\x33\x7d\x5a\xf2\x78\xc2\x55\x88\xe1\xa3\xdd\x2d\x86\x73\x07\x64\x26\x53\xdc\xa4\x45\xf5\x5c\x2a");
404- /// ```
405- pub type AsconAHash = CoreWrapper < AsconACore > ;
406- /// AsconXof
407- ///
408- /// ```
409- /// use ascon_hash::{AsconXof, ExtendableOutput, Update, XofReader};
410- ///
411- /// let mut xof = AsconXof::default();
412- /// xof.update(b"some bytes");
413- /// let mut reader = xof.finalize_xof();
414- /// let mut dst = [0u8; 5];
415- /// reader.read(&mut dst);
416- /// assert_eq!(&dst, b"\xc2\x19\x72\xfd\xe9");
417- /// ```
418- pub type AsconXof = CoreWrapper < AsconXofCore > ;
384+ digest:: newtype!(
385+ r#"Ascon hash
386+
387+ ```
388+ use ascon_hash::{AsconHash, Digest};
389+
390+ let mut hasher = AsconHash::new();
391+ hasher.update(b"some bytes");
392+ let digest = hasher.finalize();
393+ assert_eq!(&digest[..], b"\xb7\x42\xca\x75\xe5\x70\x38\x75\x70\x59\xcc\xcc\x68\x74\x71\x4f\x9d\xbd\x7f\xc5\x92\x4a\x7d\xf4\xe3\x16\x59\x4f\xd1\x42\x6c\xa8");
394+ ```"# ,
395+ AsconHash = CoreWrapper <AsconCore >
396+ ) ;
397+
398+ digest:: newtype!(
399+ r#"AsconA hash
400+
401+ ```
402+ use ascon_hash::{AsconAHash, Digest};
403+
404+ let mut hasher = AsconAHash::new();
405+ hasher.update(b"some bytes");
406+ let digest = hasher.finalize();
407+ assert_eq!(&digest[..], b"\x1d\x1a\xc8\x74\x4a\x4a\x05\x81\x33\x7d\x5a\xf2\x78\xc2\x55\x88\xe1\xa3\xdd\x2d\x86\x73\x07\x64\x26\x53\xdc\xa4\x45\xf5\x5c\x2a");
408+ ```"# ,
409+ AsconAHash = CoreWrapper <AsconACore >
410+ ) ;
411+
412+ digest:: newtype!(
413+ r#"AsconXof
414+
415+ ```
416+ use ascon_hash::{AsconXof, ExtendableOutput, Update, XofReader};
417+
418+ let mut xof = AsconXof::default();
419+ xof.update(b"some bytes");
420+ let mut reader = xof.finalize_xof();
421+ let mut dst = [0u8; 5];
422+ reader.read(&mut dst);
423+ assert_eq!(&dst, b"\xc2\x19\x72\xfd\xe9");
424+ ```"# ,
425+ AsconXof = CoreWrapper <AsconXofCore >
426+ ) ;
427+
419428/// Reader for AsconXof output
420429pub type AsconXofReader = XofReaderCoreWrapper < AsconXofReaderCore > ;
421- /// AsconAXof
422- ///
423- /// ```
424- /// use ascon_hash::{AsconAXof, ExtendableOutput, Update, XofReader};
425- ///
426- /// let mut xof = AsconAXof::default();
427- /// xof.update(b"some bytes");
428- /// let mut reader = xof.finalize_xof();
429- /// let mut dst = [0u8; 5];
430- /// reader.read(&mut dst);
431- /// assert_eq!(&dst, b"\xb8\xd6\xbd\xf0\xa7");
432- /// ```
433- pub type AsconAXof = CoreWrapper < AsconAXofCore > ;
430+
431+ digest:: newtype!(
432+ r#"AsconAXof
433+
434+ ```
435+ use ascon_hash::{AsconAXof, ExtendableOutput, Update, XofReader};
436+
437+ let mut xof = AsconAXof::default();
438+ xof.update(b"some bytes");
439+ let mut reader = xof.finalize_xof();
440+ let mut dst = [0u8; 5];
441+ reader.read(&mut dst);
442+ assert_eq!(&dst, b"\xb8\xd6\xbd\xf0\xa7");
443+ ```"# ,
444+ AsconAXof = CoreWrapper <AsconAXofCore >
445+ ) ;
446+
434447/// Reader for AsconAXof output
435448pub type AsconAXofReader = XofReaderCoreWrapper < AsconAXofReaderCore > ;
0 commit comments