mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
crypto: make Digest.sum() and Digest.write() private in md5 and sha1 (#8270)
This commit is contained in:
parent
500ebf77e4
commit
f2c6735d92
@ -51,7 +51,7 @@ pub fn new() &Digest {
|
||||
return d
|
||||
}
|
||||
|
||||
pub fn (mut d Digest) write(p_ []byte) int {
|
||||
fn (mut d Digest) write(p_ []byte) int {
|
||||
unsafe {
|
||||
mut p := p_
|
||||
nn := p.len
|
||||
@ -85,7 +85,7 @@ pub fn (mut d Digest) write(p_ []byte) int {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn (d &Digest) sum(b_in []byte) []byte {
|
||||
fn (d &Digest) sum(b_in []byte) []byte {
|
||||
// Make a copy of d so that caller can keep writing and summing.
|
||||
mut d0 := *d
|
||||
hash := d0.checksum()
|
||||
|
@ -55,7 +55,7 @@ pub fn new() &Digest {
|
||||
}
|
||||
|
||||
[manualfree]
|
||||
pub fn (mut d Digest) write(p_ []byte) int {
|
||||
fn (mut d Digest) write(p_ []byte) int {
|
||||
nn := p_.len
|
||||
unsafe {
|
||||
mut p := p_
|
||||
@ -89,7 +89,7 @@ pub fn (mut d Digest) write(p_ []byte) int {
|
||||
return nn
|
||||
}
|
||||
|
||||
pub fn (d &Digest) sum(b_in []byte) []byte {
|
||||
fn (d &Digest) sum(b_in []byte) []byte {
|
||||
// Make a copy of d so that caller can keep writing and summing.
|
||||
mut d0 := *d
|
||||
hash := d0.checksum()
|
||||
|
Loading…
Reference in New Issue
Block a user