mirror of
https://github.com/vlang/v.git
synced 2025-09-15 15:32:27 +03:00
crypto: make public all Digest.checksum() methods
This commit is contained in:
parent
3b36f16365
commit
c3ee4fb2a2
3 changed files with 6 additions and 4 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue