Files
herolib/aiprompts/v_core/crypto/rc4.md
2025-09-02 07:28:13 +02:00

1.0 KiB

module rc4

Contents

new_cipher

fn new_cipher(key []u8) !&Cipher

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.

[Return to contents]

Cipher

free

fn (mut c Cipher) free()

free the resources taken by the Cipher c

[Return to contents]

reset

fn (mut c Cipher) reset()

reset zeros the key data and makes the Cipher unusable.good to com

Deprecated: Reset can't guarantee that the key will be entirely removed from the process's memory.

[Return to contents]

xor_key_stream

fn (mut c Cipher) xor_key_stream(mut dst []u8, src []u8)

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.

[Return to contents]

Powered by vdoc. Generated on: 2 Sep 2025 07:18:17