mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
crypto: make public all Digest.checksum() methods
This commit is contained in:
parent
3b36f16365
commit
c3ee4fb2a2
@ -102,8 +102,8 @@ pub fn (d &Digest) sum(b_in []byte) []byte {
|
||||
return b_out
|
||||
}
|
||||
|
||||
// checksum returns the byte checksum of the `Digest`.
|
||||
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
|
||||
// Padding. Add a 1 bit and 0 bits until 56 bytes mod 64.
|
||||
mut tmp := []byte{len: (64)}
|
||||
|
@ -142,7 +142,8 @@ pub fn (d &Digest) sum(b_in []byte) []byte {
|
||||
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
|
||||
// Padding. Add a 1 bit and 0 bits until 56 bytes mod 64.
|
||||
mut tmp := []byte{len: (64)}
|
||||
|
@ -214,7 +214,8 @@ pub fn (d &Digest) sum(b_in []byte) []byte {
|
||||
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.
|
||||
mut len := d.len
|
||||
mut tmp := []byte{len: (128)}
|
||||
|
Loading…
Reference in New Issue
Block a user