Coder Social home page Coder Social logo

fbencryptor's People

Contributors

lakesoft avatar xcatsan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fbencryptor's Issues

I got a warning generateIv method in FBEncryptorAES.m

generateIv Method

+ (NSData*)generateIv
{
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        srand(time(NULL));
    });

    char cIv[FBENCRYPT_BLOCK_SIZE];
    for (int i=0; i < FBENCRYPT_BLOCK_SIZE; i++) {
        cIv[i] = rand() % 256;
    }
    return [NSData dataWithBytes:cIv length:FBENCRYPT_BLOCK_SIZE];
}

The warning...
FBEncryptorAES.m:156:15: Implicit conversion loses integer precision: 'time_t' (aka 'long') to 'unsigned int'

In certain cases [ERROR] failed to decrypt| CCCryptoStatus: -4304

Very helpful encryption library for CCCrypt. Thank you for sharing. For certain strings decryption works but some times decryption fails and the error message I get is [ERROR] failed to decrypt| CCCryptoStatus: -4304. I haven't modified the configuration. Any ideas?

Data decryption truncated

This happens only in iOS6.

I'm using [FBEncryptorAES decryptData: key: iv:] and everything decrypts fine in ios 5.1.1 and below.
But when i'm doing this in iOS6, my text seem to be truncated at random lengths.

Issue while decrypting using openssl.

I want to decrypt the text by openssl command. Please help me.

I am using the following command but could not able to decrypt it:
$ openssl enc -d -aes256 -in text.txt -out decrypt.txt

I am getting bad magic number error.

It is working fine on IOS end but not working with openssl.

FBEncrypter compatibility with android.

Hi there,

Are you provide support for android also . if not then how can I use this library to fulfil my need in android also or if you can suggest me another other encryption library that work same as FBEncryptor then it is very helpful for me.

Thanks.

php encrypted string can not be decrypted

in PHP , I do this to encrypt, but the encrypted string can not be decrypted with FBEncryptor.
Am I doing something wrong?

rtrim(
base64_encode(
mcrypt_encrypt(
MCRYPT_RIJNDAEL_256,
$sSecretKey, $sValue,
MCRYPT_MODE_ECB,
mcrypt_create_iv(
mcrypt_get_iv_size(
MCRYPT_RIJNDAEL_256,
MCRYPT_MODE_ECB
),
MCRYPT_RAND)
)
), "\0"
);

Use correct terminology in readme

Hi. The readme states the following:

"Encrypt/decrypt plain text message with Base64 encoding"

Since when is Base64 considered encryption? It has absolutely nothing to do with encryption and relying on base64 for security purposes is just wrong.

crypte/decrypte issues just on io 6

first i want to thank you for charing this lib.
I use FBEncryptor in one of my projects and it work fine but when i test in ios 6 the decrypt function always return "0" ( all good statue ), if i put the good password, the data returned after decrypt is good to, but with a wrong password, data is not nil and statue is "0".
I don't know if the wifi problem in ios 6 is the same as mine, because if users change on router to WPA2 TKIP from AES it work fine.

is this an issue in ios 6 or i can do something to test the file 'validity' after decrypt ?

its really an 'emergency' so thank you for help .

Mismatch with other resources

Hi,
As I'm testing your encryptor, the out put is not matched with http://aesencryption.net/.
We need to use AES 256 in both server side and the iOS app but I can not get the right out put for any data.
For ex:
NSString* encrypted = [FBEncryptorAES encryptBase64String:@"hello"
keyString:@"somekey"
separateLines:NO];
returns me: gCSyt7HUKZY/cUda3zcb4w==

but the http://aesencryption.net/ returns : i6PoffMYyd1ZLQSFl03DxWmIbD5dvOQRXLmjNnHmmjM=

As you both said the out puts are Base64 too.

Where is the problem? Please help me out.

Thanks.

problem in decrypting

when i am using a new encrypted code to decrypted then only one char string is showing with save key and iv

For ARC Optimizing and Analized Build warning

Changed as you can see in these lines.
Is It Fine?

//
// base64EncodedString
//
// Creates an NSString object that contains the base 64 encoding of the
// receiver's data. Lines are broken at 64 characters long.
//
// returns an autoreleased NSString being the base 64 representation of the
// receiver.
//

  • (NSString *)base64EncodedString
    {
    size_t outputLength;
    char *outputBuffer = NewBase64Encode([self bytes], [self length], true, &outputLength);

    // Delete the Autorelease in ORIG
    NSString *result = [[NSString alloc]
    initWithBytes:outputBuffer
    length:outputLength
    encoding:NSASCIIStringEncoding];
    free(outputBuffer);
    return result;
    }

// added by Hiroshi Hashiguchi

  • (NSString *)base64EncodedStringWithSeparateLines:(BOOL)separateLines
    {
    // ORIG size_t outputLength;
    size_t outputLength = 0;
    char *outputBuffer = NewBase64Encode([self bytes], [self length], separateLines, &outputLength);

    // Delete the Autorelease in ORIG
    NSString *result = [[NSString alloc]
    initWithBytes:outputBuffer
    length:outputLength
    encoding:NSASCIIStringEncoding];
    free(outputBuffer);
    return result;
    }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.