mirror of
				https://github.com/smaeul/u-boot.git
				synced 2025-10-30 19:48:19 +00:00 
			
		
		
		
	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>
		
			
				
	
	
		
			22 lines
		
	
	
		
			435 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			435 B
		
	
	
	
		
			C
		
	
	
	
	
	
| /*
 | |
|  * (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
 |