From d15f06444febe8320403cc0822f254cc34c2ca7f Mon Sep 17 00:00:00 2001 From: Mike Date: Tue, 3 Feb 2026 00:02:10 +0200 Subject: [PATCH] crypto.rc4: add `@[direct_array_access]` (#26507) --- vlib/crypto/rc4/rc4.v | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vlib/crypto/rc4/rc4.v b/vlib/crypto/rc4/rc4.v index 3776c89fb..2015da3bd 100644 --- a/vlib/crypto/rc4/rc4.v +++ b/vlib/crypto/rc4/rc4.v @@ -31,6 +31,7 @@ pub fn (mut c Cipher) free() { // new_cipher creates and returns a new Cipher. The key argument should be the // RC4 key, at least 1 byte and at most 256 bytes. +@[direct_array_access] pub fn new_cipher(key []u8) !&Cipher { if key.len < 1 || key.len > 256 { return error('crypto.rc4: invalid key size ' + key.len.str()) @@ -65,6 +66,7 @@ pub fn (mut c Cipher) reset() { // xor_key_stream sets dst to the result of XORing src with the key stream. // Dst and src must overlap entirely or not at all. +@[direct_array_access] pub fn (mut c Cipher) xor_key_stream(mut dst []u8, src []u8) { if src.len == 0 { return -- 2.39.5