Skip to content

Commit 5c8fd15

Browse files
crypto.rc4: change the return type of new_cipher to be !&Cipher (#24113)
1 parent e912854 commit 5c8fd15

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎vlib/crypto/rc4/rc4.v‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ pub fn (mut c Cipher) free() {
3131

3232
// new_cipher creates and returns a new Cipher. The key argument should be the
3333
// RC4 key, at least 1 byte and at most 256 bytes.
34-
pub fn new_cipher(key []u8) !Cipher {
34+
pub fn new_cipher(key []u8) !&Cipher {
3535
if key.len < 1 || key.len > 256 {
3636
return error('crypto.rc4: invalid key size ' + key.len.str())
3737
}
38-
mut c := Cipher{
38+
mut c := &Cipher{
3939
s: []u32{len: (256)}
4040
}
4141
for i in 0 .. 256 {

0 commit comments

Comments
 (0)