crypto: make public all Digest.checksum() methods
parent
3b36f16365
commit
c3ee4fb2a2
|
@ -102,8 +102,8 @@ pub fn (d &Digest) sum(b_in []byte) []byte {
|
||||||
return b_out
|
return b_out
|
||||||
}
|
}
|
||||||
|
|
||||||
// checksum returns the byte checksum of the `Digest`.
|
// checksum returns the current byte checksum of the `Digest`.
|
||||||
fn (mut d Digest) checksum() []byte {
|
pub fn (mut d Digest) checksum() []byte {
|
||||||
mut len := d.len
|
mut len := d.len
|
||||||
// Padding. Add a 1 bit and 0 bits until 56 bytes mod 64.
|
// Padding. Add a 1 bit and 0 bits until 56 bytes mod 64.
|
||||||
mut tmp := []byte{len: (64)}
|
mut tmp := []byte{len: (64)}
|
||||||
|
|
|
@ -142,7 +142,8 @@ pub fn (d &Digest) sum(b_in []byte) []byte {
|
||||||
return b_out
|
return b_out
|
||||||
}
|
}
|
||||||
|
|
||||||
fn (mut d Digest) checksum() []byte {
|
// checksum returns the current byte checksum of the Digest.
|
||||||
|
pub fn (mut d Digest) checksum() []byte {
|
||||||
mut len := d.len
|
mut len := d.len
|
||||||
// Padding. Add a 1 bit and 0 bits until 56 bytes mod 64.
|
// Padding. Add a 1 bit and 0 bits until 56 bytes mod 64.
|
||||||
mut tmp := []byte{len: (64)}
|
mut tmp := []byte{len: (64)}
|
||||||
|
|
|
@ -214,7 +214,8 @@ pub fn (d &Digest) sum(b_in []byte) []byte {
|
||||||
return b_out
|
return b_out
|
||||||
}
|
}
|
||||||
|
|
||||||
fn (mut d Digest) checksum() []byte {
|
// checksum returns the current byte checksum of the Digest.
|
||||||
|
pub fn (mut d Digest) checksum() []byte {
|
||||||
// Padding. Add a 1 bit and 0 bits until 112 bytes mod 128.
|
// Padding. Add a 1 bit and 0 bits until 112 bytes mod 128.
|
||||||
mut len := d.len
|
mut len := d.len
|
||||||
mut tmp := []byte{len: (128)}
|
mut tmp := []byte{len: (128)}
|
||||||
|
|
Loading…
Reference in New Issue