Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: AES_example shaun_larada Smartage
Fork of Crypto by
cipher/StreamCipher.cpp
- Committer:
- feb11
- Date:
- 2013-09-14
- Revision:
- 8:a090264e9b2d
File content as of revision 8:a090264e9b2d:
#include "StreamCipher.h"
StreamCipher::StreamCipher()
{
}
CIPHER_TYPE StreamCipher::getType() const
{
return STREAM_CIPHER;
}
void StreamCipher::encrypt(uint8_t *out, uint8_t *in, uint32_t length)
{
for(uint32_t i = 0; i < length; ++i)
out[i] = encryptByte(in[i]);
}
void StreamCipher::decrypt(uint8_t *out, uint8_t *in, uint32_t length)
{
for(uint32_t i = 0; i < length; ++i)
out[i] = decryptByte(in[i]);
}
