]> git.lizzy.rs Git - rust.git/commitdiff
Fix visibility of digest implementations
authorDavid Creswick <dcrewi@gyrae.net>
Wed, 25 Sep 2013 23:34:09 +0000 (18:34 -0500)
committerDavid Creswick <dcrewi@gyrae.net>
Thu, 26 Sep 2013 00:39:17 +0000 (19:39 -0500)
src/libextra/crypto/md5.rs
src/libextra/crypto/sha2.rs

index 8e07c7ee1c7cac43a4903a382022ce6d867e4350..5ef113971abb0e0672cc5aadcec0fa9c7d85298d 100644 (file)
@@ -156,7 +156,7 @@ fn op_i(w: u32, x: u32, y: u32, z: u32, m: u32, s: u32) -> u32 {
 
 
 /// The MD5 Digest algorithm
-struct Md5 {
+pub struct Md5 {
     priv length_bytes: u64,
     priv buffer: FixedBuffer64,
     priv state: Md5State,
index 10289fb8b976465ebde8557f07746ddd25ff7994..4a8b62ffd114193de34635cd54786ed5fa3ef416 100644 (file)
@@ -230,7 +230,8 @@ fn finish(&mut self) {
 }
 
 
-struct Sha512 {
+/// The SHA-512 hash algorithm
+pub struct Sha512 {
     priv engine: Engine512
 }
 
@@ -282,7 +283,8 @@ fn output_bits(&self) -> uint { 512 }
 ];
 
 
-struct Sha384 {
+/// The SHA-384 hash algorithm
+pub struct Sha384 {
     priv engine: Engine512
 }
 
@@ -332,7 +334,8 @@ fn output_bits(&self) -> uint { 384 }
 ];
 
 
-struct Sha512Trunc256 {
+/// The SHA-512 hash algorithm with digest truncated to 256 bits
+pub struct Sha512Trunc256 {
     priv engine: Engine512
 }
 
@@ -380,7 +383,8 @@ fn output_bits(&self) -> uint { 256 }
 ];
 
 
-struct Sha512Trunc224 {
+/// The SHA-512 hash algorithm with digest truncated to 224 bits
+pub struct Sha512Trunc224 {
     priv engine: Engine512
 }
 
@@ -635,7 +639,8 @@ fn finish(&mut self) {
 }
 
 
-struct Sha256 {
+/// The SHA-256 hash algorithm
+pub struct Sha256 {
     priv engine: Engine256
 }
 
@@ -687,7 +692,8 @@ fn output_bits(&self) -> uint { 256 }
 ];
 
 
-struct Sha224 {
+/// The SHA-224 hash algorithm
+pub struct Sha224 {
     priv engine: Engine256
 }