1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-08-31 16:22:36 +02:00

Add rivest cipher 4 (rc4) implementation

Add an implementation of RC4. This will be used by Rockchip booting but may
be useful in other situations.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2015-06-23 15:39:07 -06:00
parent 6e780c7a7b
commit 1acab96d97
3 changed files with 71 additions and 0 deletions

21
include/rc4.h Normal file
View File

@@ -0,0 +1,21 @@
/*
* (C) Copyright 2015 Google, Inc
*
* (C) Copyright 2008-2014 Rockchip Electronics
*
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef __RC4_H
#define __RC4_H
/**
* rc4_encode() - encode a buf with the RC4 cipher
*
* @buf: Buffer to encode (it is overwrite in the process
* @len: Length of buffer in bytes
* @key: 16-byte key to use
*/
void rc4_encode(unsigned char *buf, unsigned int len, unsigned char key[16]);
#endif