Skip to content

Commit

Permalink
ensure length of filled NSData
Browse files Browse the repository at this point in the history
  • Loading branch information
bigsan committed Jul 17, 2012
1 parent ea613f3 commit 3167922
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions RSAESCryptor/RSAESCryptor.m
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ - (NSData *)wrapSymmetricKey:(NSData *)symmetricKey keyRef:(SecKeyRef)publicKey
cipher.mutableBytes,
&cipherBufferSize);
NSAssert(sanityCheck == noErr, @"Error encrypting, OSStatus == %d.", sanityCheck);
[cipher setLength:cipherBufferSize];

return cipher;
}
Expand Down

0 comments on commit 3167922

Please sign in to comment.