v2 #12
| @ -288,13 +288,6 @@ class AES implements Cipher<AESCipherChunk> { | |||||||
|       ); |       ); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     if (bytes.isEmpty) { |  | ||||||
|       throw NativeCryptoException( |  | ||||||
|         code: NativeCryptoExceptionCode.invalidData, |  | ||||||
|         message: 'Platform returned no data on chunk #$count', |  | ||||||
|       ); |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     return bytes; |     return bytes; | ||||||
|   } |   } | ||||||
| } | } | ||||||
|  | |||||||
| @ -6,8 +6,13 @@ | |||||||
| 
 | 
 | ||||||
| abstract class Constants { | abstract class Constants { | ||||||
|   /// The default chunk size in bytes used for encryption and decryption. |   /// The default chunk size in bytes used for encryption and decryption. | ||||||
|  |   ///  | ||||||
|  |   /// ~32MB | ||||||
|   static const int defaultChunkSize = 33554432; |   static const int defaultChunkSize = 33554432; | ||||||
| 
 | 
 | ||||||
|  |   /// The length of the initialization vector in bytes used for AES GCM. | ||||||
|   static const int aesGcmNonceLength = 12; |   static const int aesGcmNonceLength = 12; | ||||||
|  | 
 | ||||||
|  |   /// The length of the tag in bytes used for AES GCM. | ||||||
|   static const int aesGcmTagLength = 16; |   static const int aesGcmTagLength = 16; | ||||||
| } | } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user