This library implements some hash and cryptographic algorithms.

Dependents:   ES_CW2_Starter_JIN EMBEDDED_CW2 EMBEDDED_CW2_Final Spinnybois ... more

Fork of Crypto by Francois Berder

Committer:
estott
Date:
Fri Mar 09 10:10:16 2018 +0000
Revision:
15:634f9c4cbab1
Parent:
8:a090264e9b2d
Reduced flash footprint by removing __forceinline directive in SHA2_32.c

Who changed what in which revision?

UserRevisionLine numberNew contents of line
feb11 8:a090264e9b2d 1 #ifndef STREAM_CIPHER_H
feb11 8:a090264e9b2d 2 #define STREAM_CIPHER_H
feb11 8:a090264e9b2d 3
feb11 8:a090264e9b2d 4 #include "Cipher.h"
feb11 8:a090264e9b2d 5
feb11 8:a090264e9b2d 6 class StreamCipher : public Cipher
feb11 8:a090264e9b2d 7 {
feb11 8:a090264e9b2d 8 public :
feb11 8:a090264e9b2d 9
feb11 8:a090264e9b2d 10 StreamCipher();
feb11 8:a090264e9b2d 11
feb11 8:a090264e9b2d 12 virtual CIPHER_TYPE getType() const;
feb11 8:a090264e9b2d 13
feb11 8:a090264e9b2d 14 virtual void encrypt(uint8_t *out, uint8_t *in, uint32_t length);
feb11 8:a090264e9b2d 15 virtual void decrypt(uint8_t *out, uint8_t *in, uint32_t length);
feb11 8:a090264e9b2d 16
feb11 8:a090264e9b2d 17 protected :
feb11 8:a090264e9b2d 18
feb11 8:a090264e9b2d 19 virtual uint8_t encryptByte(uint8_t in) = 0;
feb11 8:a090264e9b2d 20 virtual uint8_t decryptByte(uint8_t in) = 0;
feb11 8:a090264e9b2d 21
feb11 8:a090264e9b2d 22 };
feb11 8:a090264e9b2d 23
feb11 8:a090264e9b2d 24 #endif