RAW key generation in IOS with AES

Posted by sudheer on Stack Overflow See other posts from Stack Overflow or by sudheer
Published on 2013-06-30T16:17:18Z Indexed on 2013/06/30 16:21 UTC
Read the original article Hit count: 213

Filed under:
|
|
|

I am novice to the cryptography in ios . I got a requirement to convert android encryption code into IOS . Below is the android code part. I need that in IOS .

Can any one please help me out in this . I need this below android code in IOS.

private static byte[] getRawKey(byte[] seed) throws Exception {
        KeyGenerator kgen = KeyGenerator.getInstance("AES");
        SecureRandom sr = SecureRandom.getInstance("SHA1PRNG");
        sr.setSeed(seed);
        kgen.init(256, sr); 
        SecretKey skey = kgen.generateKey();
        byte[] raw = skey.getEncoded();
        return raw;
    }

© Stack Overflow or respective owner

Related posts about android

Related posts about ios