mirror of
				https://github.com/cuberite/polarssl.git
				synced 2025-11-03 20:22:59 -05:00 
			
		
		
		
	Rename poly1305_setkey() to poly1305_starts()
For consistency with the existing CMAC and HMAC APIs
This commit is contained in:
		
							parent
							
								
									b7e99006f9
								
							
						
					
					
						commit
						4edd51babe
					
				@ -81,7 +81,7 @@ void mbedtls_poly1305_free( mbedtls_poly1305_context *ctx );
 | 
				
			|||||||
 *                      or key are NULL.
 | 
					 *                      or key are NULL.
 | 
				
			||||||
 *                      Otherwise, 0 is returned to indicate success.
 | 
					 *                      Otherwise, 0 is returned to indicate success.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
int mbedtls_poly1305_setkey( mbedtls_poly1305_context *ctx,
 | 
					int mbedtls_poly1305_starts( mbedtls_poly1305_context *ctx,
 | 
				
			||||||
                             const unsigned char key[32] );
 | 
					                             const unsigned char key[32] );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 | 
				
			|||||||
@ -155,7 +155,7 @@ int mbedtls_aead_chacha20_poly1305_starts( mbedtls_aead_chacha20_poly1305_contex
 | 
				
			|||||||
    if ( result != 0 )
 | 
					    if ( result != 0 )
 | 
				
			||||||
        goto cleanup;
 | 
					        goto cleanup;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    result = mbedtls_poly1305_setkey( &ctx->poly1305_ctx, poly1305_key );
 | 
					    result = mbedtls_poly1305_starts( &ctx->poly1305_ctx, poly1305_key );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if ( result == 0 )
 | 
					    if ( result == 0 )
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
 | 
				
			|||||||
@ -256,7 +256,7 @@ void mbedtls_poly1305_free( mbedtls_poly1305_context *ctx )
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int mbedtls_poly1305_setkey( mbedtls_poly1305_context *ctx,
 | 
					int mbedtls_poly1305_starts( mbedtls_poly1305_context *ctx,
 | 
				
			||||||
                             const unsigned char key[32] )
 | 
					                             const unsigned char key[32] )
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    if ( ctx == NULL )
 | 
					    if ( ctx == NULL )
 | 
				
			||||||
@ -400,7 +400,7 @@ int mbedtls_poly1305_mac( const unsigned char key[32],
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    mbedtls_poly1305_init( &ctx );
 | 
					    mbedtls_poly1305_init( &ctx );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    result = mbedtls_poly1305_setkey( &ctx, key );
 | 
					    result = mbedtls_poly1305_starts( &ctx, key );
 | 
				
			||||||
    if ( result != 0 )
 | 
					    if ( result != 0 )
 | 
				
			||||||
        goto cleanup;
 | 
					        goto cleanup;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user